Skip to content

Commit

Permalink
Added SonarQube quality gate to the Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
huskyrat committed Sep 18, 2024
1 parent ed10ca9 commit 1b9420d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This adds a quality gate that aborts the pipeline if the quality threshold isn't met
pipeline {
agent any

Expand All @@ -15,8 +16,11 @@ pipeline {
steps {
withSonarQubeEnv('sonar-qube-1') {
sh "${scannerHome}/bin/sonar-scanner"
}
}
timeout(time: 10, unit: 'MINUTES'){
waitForQualityGate abortPipeline: true
}
}
}
}
}

0 comments on commit 1b9420d

Please sign in to comment.