Friday, 10 July 2020

Fix SonarQube does not return status of waitForQualityGate() to jenkins?

Try to put sleep(60) command before the check:
sleep(60)
timeout(time: 1, unit: 'MINUTES') {
    def qg = waitForQualityGate()
    print "Finished waiting"
    if (qg.status != 'OK') {
        error "Pipeline aborted due to quality gate failure: ${qg.status}"
    }
}  
It solved same problem for me.

from : https://stackoverflow.com/questions/56209464/sonarqube-does-not-return-status-of-waitforqualitygate-to-jenkins

Fix SonarQube does not return status of waitForQualityGate() to jenkins?

Try to put  sleep(60)  command before the check: sleep(60) timeout(time: 1, unit: 'MINUTES') { def qg = waitForQualityGate() ...