Sonarqube quality gate status check fail/pass in Jenkins pipeline

Hi
I am using below Jenkins and SonarQube version.

Jenkins: - 2.73.3
SonarQube: - 6.7

I want to update the Sonarqube quality gate status on jenkins pipeline if QG is fail than Jenkins job should be failed. I have used below configuration in our Jenkins pipeline.

  stage("Quality Gate") {
        steps {
          timeout(time: 3, unit: 'MINUTES') {
            waitForQualityGate abortPipeline: true
          }
        }
      }

after implementing above configuration in Jenkins pipeline getting below error.

Please confirm if i have to use some another configration.

Hey there,

You’re using very old, unsupported versions of both Jenkins and SonarQube.

For SonarQube, your upgrade path is:

6.7 → 7.9.6 → 8.9.10 → 9.9.6 → 10.6 (last step optional)

You may find these resources helpful:

For Jenkins, 2.73.73 was released in November 2017. It is not going to be compatible with any supported version of the SonarQube extension for Jenkins. Probably, the old version you’re using doesn’t support abortPipeline.

1 Like

Hi
I am using below Jenkins and SonarQube version.

Jenkins: - 2.440.2
SonarQube: - 9.9.5

I want to update the Sonarqube quality gate status on jenkins pipeline if QG is fail than Jenkins job should be failed. I have used below configuration in our Jenkins pipeline.

stage(“Quality Gate”) {
steps {
timeout(time: 3, unit: ‘MINUTES’) {
waitForQualityGate abortPipeline: true
}
}
}
After successfully analysis QG is showing passed in sonarqube dashboard but still not getting the correct response on Jenkins pipeline.

Have you configured the required Webhook?

Hi Colin
Yes, I have already configured the webhook.
Before i week ago its working fine don’t know why suddenly stop working.

Well, it looks like the Webhook delivery is failing. Something could have changed on the Jenkins side (firewall, etc.)

You can get more details about the failure by clicking on the gear icon.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.