Checking status of SonarQube task 'AXOZqXs8DyN1EpMuuoNk' on server 'sonar'
SonarQube task 'AXOZqXs8DyN1EpMuuoNk' status is 'PENDING'
SonarQube task 'AXOZqXs8DyN1EpMuuoNk' status is 'SUCCESS'
SonarQube task 'AXOZqXs8DyN1EpMuuoNk' completed. Quality gate is 'ERROR'
Pipeline aborted due to quality gate failure: ERROR
stage('代码质量分析') {
steps {
container('maven') {
withCredentials([string(credentialsId: "$SONAR_CREDENTIAL_ID", variable: 'SONAR_TOKEN')]) {
withSonarQubeEnv('sonar') {
sh "mvn sonar:sonar -gs `pwd`/mvn-settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN"
}
}
timeout(time: 1, unit: 'HOURS') {
waitForQualityGate true
}
}
}
}