Updated the SQ quality gate check to use an embedded script step.

This commit is contained in:
Christopher Jones 2017-09-06 11:54:57 -05:00
parent 73ca495ee7
commit 349eb685e0

2
Jenkinsfile vendored
View file

@ -31,6 +31,7 @@ pipeline {
stage('SonarQube Quality Gate') { stage('SonarQube Quality Gate') {
steps { steps {
timeout(time: 1, unit: 'HOURS') { timeout(time: 1, unit: 'HOURS') {
script {
def qg = waitForQualityGate() def qg = waitForQualityGate()
if (qg.status != 'OK') { if (qg.status != 'OK') {
error "Pipeline aborted due to quality gate failure: ${qg.status}" error "Pipeline aborted due to quality gate failure: ${qg.status}"
@ -38,6 +39,7 @@ pipeline {
} }
} }
} }
}
stage('Approve for QA') { stage('Approve for QA') {
steps { steps {