- Define a pipeline following the steps in Defining a Jenkins Pipeline. Make sure to select Pipeline script from the Pipeline Definition field in step 3.
-
Include the following code snippet in the Script text area of the build
configuration, making sure to replace the following tokens in the template with
actual values.
-
GIT_REPO_URL: This is the URL to the Git repository where the source code is stored. -
SIGMA_TOOL_NAME: This is the name of the Sigma installation you specified when you configured the Sigma installation.
Template for using Sigma as a quality gatenode { stage('Clone Repo') { git '<GIT_REPO_URL>' } stage('Sigma') { sigma ignorePolicies: false, sigmaToolName: '<SIGMA_TOOL_NAME>' } stage('Sigma Results') { archiveArtifacts 'sigma-results.json' } }Template for using Sigma to report issues within Jenkinsnode { stage('Clone Repo') { git '<GIT_REPO_URL>' } stage('Sigma') { sigma ignorePolicies: true, sigmaToolName: '<SIGMA_TOOL_NAME>' } stage('Sigma Results') { archiveArtifacts 'sigma-results.json' recordIssues(tools: [[$class: 'SigmaTool']]) } } -