由于内部服务器不能连接外网,所以jenkins插件选择的是本地下载后上传安装。

安装好了SonarQube,Sonar插件,和SonarQube Scanner
全局工具配置SonarQube Scanner 的路径:

/apps/opm/env/sonar/sonar-scanner-4.2.0.1873-linux

运行sonar构建时,一直提示SonarQube Scanner executable was not found for sonar scanner:

------------------------------------------------------------------------
SONAR ANALYSIS FAILED
------------------------------------------------------------------------
FATAL: SonarQube Scanner executable was not found for sonar-scanner-4.2.0.1873-linux
Build step 'Execute SonarQube Scanner' marked build as failure
Finished: FAILURE

一直找不到具体的原因。后来发现路径的末尾少了 间隔符【/】
把SonarQube Scanner的路径改为:

/apps/opm/env/sonar/sonar-scanner-4.2.0.1873-linux/

即可。

Logo

更多推荐