[英]sonar qube on jenkins pipeline
How can I make that sonnar qube server analyze a mvn project on jenkins?. 如何使Sonnar Quube服务器分析jenkins上的mvn项目? I have a pipeline project from CSM with a jenkinfile which point to a groovy file where all steps of the job are executed.
我有一个来自CSM的带有jenkinfile的管道项目,该项目指向执行作业的所有步骤的常规文件。 All steps are working ok (mvn test, mvn package, mvn compile, etc), but don´t know how to execute the mvn sonar:sonar.
所有步骤都可以正常运行(mvn测试,mvn程序包,mvn编译等),但是不知道如何执行mvn sonar:sonar。 It gives following error.Image show how do I have sonar configured in jenkins and the job step where it fails.
它给出以下错误图像显示如何在jenkins中配置声纳以及失败的工作步骤。
And this is how I have the step described in groovy file of pipeline: 这就是我在管道的groovy文件中描述的步骤:
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')
. 尝试在withSonarQubeEnv中使用服务器安装名称,现在您正在使用URL,即
withSonarQubeEnv('Grey Azure Sonarqube')
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.