执行后报错:
ERROR: SonarQube installation defined in this job (sonar) does not match any configured installation. Number of installations that can be configured: 1.
If you want to reassign jobs to a different SonarQube installation, check the documentation under https://redirect.sonarsource.com/plugins/jenkins.html
Finished: FAILURE
同样的命令,单独把分支拉取下来,是可以执行的
stage('sonarqube analysis') {
steps {
withSonarQubeEnv('sonar') {
container('maven') {
sh """
ls -l .
mvn sonar:sonar -Dsonar.projectKey=devops -Dsonar.host.url=http://10.1.1.12:31132 -Dsonar.login=103b6fd12510e31d992674ae5ec402bb7f43b2b0
"""
}
}
}
}