Hello,
We are launching analysis from Cloudbees pipeline but sometimes the analysis is cancelled with no reason. This beaviour occurs since we update Sonarqube from 7.9.1 to 8.3.1. We also update our Sonar Scanner to version 4.3.
Log show no messages even with trace level.
In background task, we can see the analysis is pending whereas no other activity is in progress. And after about 1min, the task is cancelled.
I already check the PostgreSQL database, server load and the sonar webhook configuration but all seems fine.
Here is the pipeline use to launch analysis :
stage('quality') {
tools {
jdk "JDK openjdk 11"
}
steps {
script {
// add GIT_BRANCH to sonar analysis
def sonarBranch = ''
if ( GIT_BRANCH.trim().contains('origin/master')) {
sonarBranch = "master"
} else {
sonarBranch = GIT_BRANCH.replace("origin/","")
}
def scannerHome = tool 'Sonar Scanner 4.3'
utilsExecuteCommand(cmd: "mvn clean verify -Pcoverage")
withSonarQubeEnv('Sonar LTS') {
if (isUnix()) {
utilsExecuteCommand(cmd: "${scannerHome}/bin/sonar-scanner -D${sonarBranch}")
} else
utilsExecuteCommand(cmd: "${scannerHome}/bin/sonar-scanner.bat -D${sonarBranch}")
}
}
updateGitlabCommitStatus name: 'quality', state: 'success'
}
}
stage('quality gate') {
tools {
jdk "JDK openjdk 11"
}
steps {
script {
timeout(time: 10) {
def qualitygate = waitForQualityGate()
if (qualitygate.status != "OK") {
error "Pipeline aborted due to quality gate coverage failure: ${qualitygate.status}"
}
}
}
}
}
Any idea of what goes wrong ?
Thanks.