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

8
Jenkinsfile vendored
View file

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