Jenkins: Success builds when the Quality Gate is passed

This commit is contained in:
Johannes Schnatterer
2018-07-16 11:54:35 +02:00
parent 62e48df785
commit ffd69f053c

5
Jenkinsfile vendored
View File

@@ -96,14 +96,15 @@ void analyzeWith(Maven mvn) {
}
boolean waitForQualityGateWebhookToBeCalled() {
boolean isQualityGateSucceeded = true
timeout(time: 2, unit: 'MINUTES') { // Needed when there is no webhook for example
def qGate = waitForQualityGate()
echo "SonarQube Quality Gate status: ${qGate.status}"
if (qGate.status != 'OK') {
return false
isQualityGateSucceeded = false
}
}
return isQualityGateSucceeded
}
String getCommitAuthorComplete() {