-
Bug
-
Resolution: Unresolved
-
Minor
-
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
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.
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.