Webhook issue - quality gate waiting for indefinite period - jenkins build fails

I have recently upgraded sonar 6.7 LTS community edition to developer edition 7.9.1. Now I checked that quality gate check is timing out and hence jenkins build fails.
Below code used in jenkinsfile.

  stage("Quality Gate")
  {
	timeout(time: 3, unit: 'MINUTES') {
      
      def qg = waitForQualityGate() // Reuse taskId previously collected by withSonarQubeEnv
if (qg.status != 'OK') {
  error "Pipeline aborted due to quality gate failure: ${qg.status}"
}             

}
}

Getting error in jenkins log is belo.

[Pipeline] { (Quality Gate)
[Pipeline] timeout
Timeout set to expire in 3 min 0 sec
[Pipeline] {
[Pipeline] waitForQualityGate
Checking status of SonarQube task ‘AWvlaGWTyi9ZpELEoG1I’ on server ‘STC SonarQube’
SonarQube task ‘AWvlaGWTyi9ZpELEoG1I’ status is ‘IN_PROGRESS’
Cancelling nested steps due to timeout
[Pipeline] }

  • versions used - Developer Edition Version 7.9.1 (build 27448)
  • error observed - quality gate timeout

Please let us know if any modifications need to be done.
P.S.: The same code perfectly works with Sonar community edition 7.7 version.

Greeting @him_s,
Have you checked the following threads ?

Alex.

2 Likes

Thanks Alexandre. It worked