简体   繁体   中英

sonar qube on jenkins pipeline

How can I make that sonnar qube server analyze a mvn project on jenkins?. I have a pipeline project from CSM with a jenkinfile which point to a groovy file where all steps of the job are executed. All steps are working ok (mvn test, mvn package, mvn compile, etc), but don´t know how to execute the mvn sonar:sonar. It gives following error.Image show how do I have sonar configured in jenkins and the job step where it fails.

And this is how I have the step described in groovy file of pipeline:

stage ('SonarQube analysis') {
    withSonarQubeEnv('https://sonarqube.xxxxx.com') {
        sh 'mvn sonar:sonar'
    }  
}

詹金斯原木

Try using the server installation name in withSonarQubeEnv, right now you are using URL ie withSonarQubeEnv('Grey Azure Sonarqube') .

Documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM