Hi
I am having some problems with Sonarqube qualitygate in Jenkins
I have a step like this to check the qualitygate
stage("Quality Gate") {
timeout(time: 1, unit: 'HOURS') {
def qg = waitForQualityGate()
if (qg.status != 'OK') {
error "Pipeline aborted due to quality gate failure: ${qg.status}"
}
}
}
When executing, it remains in "IN_PROGRESS" status... until it gives a timeout
Timeout set to expire in 1 hr 0 min
[Pipeline] {
[Pipeline] waitForQualityGate
Checking status of SonarQube task 'AV0Sbi3ZpG-WqJEb8IOy' on server 'Sonarqube'
SonarQube task 'AV0Sbi3ZpG-WqJEb8IOy' status is 'IN_PROGRESS'
But checking the jenkins pipeline, it has been turned green, and also the task is marked as completed in the API ($sonarinstance/api/ce/task?id=AV0Sbi3ZpG-WqJEb8IOy)
{"task":{"organization":"default-organization","id":"AV0Sbi3ZpG-WqJEb8IOy","type":"REPORT","componentId":"AV0SZKpwpG-WqJEb8IOw","componentKey":"PoCPipeline","componentName":"PoCPipeline","componentQualifier":"TRK","analysisId":"AV0Sbi-T7cHLey_aoMNQ","status":"SUCCESS","submittedAt":"2017-07-05T11:06:36+0000","startedAt":"2017-07-05T11:06:37+0000","executedAt":"2017-07-05T11:06:42+0000","executionTimeMs":5356,"logs":false,"hasScannerContext":true}}
So, basically, looks like the jenkins job is not receiving this answer correctly
Any idea on what could be the problem?
Thanks