• 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.

          [JENKINS-70218] waitForQualityGate could get stuck (2.15)

          Mikhail added a comment -

          The same problem exists on 2.14. Moreover this problem is floating, sometimes it appears, sometimes not.

          Please fix it, because it really annoys that it needs to add additional 30 seconds to pipeline for fixing it.

          Mikhail added a comment - The same problem exists on 2.14. Moreover this problem is floating, sometimes it appears, sometimes not. Please fix it, because it really annoys that it needs to add additional 30 seconds to pipeline for fixing it.

          Mikhail added a comment -

          Looks like 30 seconds timeout is not enough for fixing this problem. We increased timeout up to 40 seconds. 

          Mikhail added a comment - Looks like 30 seconds timeout is not enough for fixing this problem. We increased timeout up to 40 seconds. 

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

              Created:
              Updated: