Renamed allowableStatuses to be more specific and fixed a typo.

This commit is contained in:
Christopher Jones 2017-09-06 12:39:05 -05:00
parent 08601fc8e9
commit 6be06388a1

6
Jenkinsfile vendored
View file

@ -33,14 +33,14 @@ pipeline {
timeout(time: 1, unit: 'HOURS') { timeout(time: 1, unit: 'HOURS') {
script { script {
// these are the statuses that we'll allow // these are the statuses that we'll allow
def alowableStatuses = ['OK','WARN'] def allowableQualityGateStatuses = ['OK','WARN']
// we need to wait for the quality check to complete // we need to wait for the quality check to complete
def qg = waitForQualityGate() def qualityGate = waitForQualityGate()
// if the status we got back, isn't one of the logal ones, then // if the status we got back, isn't one of the logal ones, then
// we need o fail the build // we need o fail the build
if (!allowableStatuses.contains(qg.status)) { if (!allowableQualityGateStatuses.contains(qualityGate.status)) {
error "Pipeline aborted due to quality gate failure: ${qg.status}" error "Pipeline aborted due to quality gate failure: ${qg.status}"
} }
} }