我按照下面网址中的说明来配置 jenkins/sonar。
我走到了这一步
- Scroll down to the SonarQube Runner configuration section and click on Add SonarQube Runner. [...]
If you don't see a drop down list with all available SonarQube Runner versions but instead see an empty text field then this is because Jenkins still don't have downloaded required update center file (default period is 1 day). You may force this refresh by clicking 'Check Now' button in Manage Plugins >> Advanced tab.
本教程没有提及在服务器无法连接到互联网的情况下如何解决此问题(许多或大多数公司都会遇到这种情况!)。 IMO 提供的“所需更新中心文件”的解释含糊不清。
感谢任何帮助。
最佳答案
如果您的 Jenkins 服务器无法访问互联网来下载更新文件,那么它也将无法自动安装扫描仪。
对于您的情况,您需要手动安装扫描仪,然后在 Jenkins 中配置它的路径。
关于jenkins - 为 Jenkins 安装和配置 SonarQube Scanner - 需要澄清,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44207698/