SonarQube代码检查报异常
SonarQube installation defined in this job (sonar) does not match any configured installation. Number of installations that can be configured: 0.
If you want to reassign jobs to a different SonarQube installation, check the documentation under https://redirect.sonarsource.com/plugins/jenkins.html
这个怎么解决
这是流水线文件
stage('sonarqube analysis') {
steps {
container ('maven') {
sh 'echo 当前目录 11111111111111111'
withCredentials([string(credentialsId: "$SONAR_CREDENTIAL_ID", variable: 'SONAR_TOKEN')]) {
withSonarQubeEnv('sonar') {
sh 'echo 当前目录
pwd'
sh "mvn sonar:sonar -gs
pwd/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN"
}
}
timeout(time: 1, unit: 'HOURS') {
waitForQualityGate abortPipeline: true
}
}
}
}