Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70218

waitForQualityGate could get stuck (2.15)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • sonar-plugin
    • None
    • SonarQube Scanner for Jenkins Version 2.15
      Jenkins 2.375.1

      https://sonarsource.atlassian.net/browse/SONARJNKNS-320

       

      This issue still persists in 2.15 even though it says it's fixed in 2.12.

       

            stage('Run SonarQube') {
              steps {
                withSonarQubeEnv(installationName: 'sonarqube', credentialsId: 'sonarqube') {
                  sh "${SCANNER_HOME}/bin/sonar-scanner"
                }
                timeout(time: 10, unit: 'MINUTES') {
                  waitForQualityGate abortPipeline: true
                }
              }
            } 

       

       

      With this declarative pipeline step my jobs still hang for 10m and then abort:

      Checking status of SonarQube task 'AYTp7JmWvZaVgf8Kzr2p' on server 'sonarqube'
      SonarQube task 'AYTp7JmWvZaVgf8Kzr2p' status is 'IN_PROGRESS'

      However when I add a sleep 30 to the declaritive pipeline step above the issue goes away as mentioned in this article

      https://community.sonarsource.com/t/jenkins-waitforqualitygate-issues-when-mr-pr-decoration-is-involved/26917

       

            stage('Run SonarQube') {
              steps {
                withSonarQubeEnv(installationName: 'sonarqube', credentialsId: 'sonarqube') {
                  sh "${SCANNER_HOME}/bin/sonar-scanner"
                  sh "sleep 30"
                }
                timeout(time: 10, unit: 'MINUTES') {
                  waitForQualityGate abortPipeline: true
                }
              }
            } 

      The above step with the sleep 30 makes this issue go away.

            sonarteam Sonar Team
            bcarpio Brian Carpio
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: