【发布时间】:2017-02-05 05:36:30
【问题描述】:
我有以下情况:
服务器配置:Jenkins 版本。 2.7.1、SonarQube 插件 2.4.4
我的工作是使用 SonarQube 来检查一些质量指标。 SonarQube 服务器在 Jenkins 中配置良好,运行良好。
到目前为止,我使用 SonarQube Scanner 作为后期构建步骤,但现在不推荐这样做。
然后我将其更改为构建步骤和...
...配置 SonarQube Scanner 构建步骤后
SonarCube Scanner Configuration
,我开始工作构建,然后我得到:
Skipping installation of https://repo1.maven.org/maven2/org/sonarsource/scanner/cli/sonar-scanner-cli/2.6.1/sonar-scanner-cli-2.6.1.zip to /.../.jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/Sonar_Runner: java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.0 403 Forbidden"
------------------------------------------------------------------------
SONAR ANALYSIS FAILED
------------------------------------------------------------------------
FATAL: SonarQube Scanner executable was not found for Sonar Runner
Build step 'Execute SonarQube Scanner' marked build as failure
好的。那是真实的。不允许从 Internet 直接下载任何东西到 Build Server。
在Analyzing with SonarQube Scanner页面上,没有关于这种后台自动下载以及如何配置的内容。
这是我在 Jenkins 中看到的所有 SonarCube 选项:
SonarQube servers
Environment variables
SonarQube installations
Name
Server URL
Server version
Server authentication token
SonarQube account login
SonarQube account password
Version of sonar-maven-plugin
Additional arguments
Additional analysis properties
Database URL
Database login
Database password
Skip if triggered by SCM Changes
Skip if triggered by the build of a dependency
Skip if environment variable is defined and set to true
我尝试将代理设置为 JAVA_OPTS 或环境变量,但没有帮助,而且无论如何我不会很高兴。
有人找到离线使用 SonarQube 扫描仪的方法了吗?
备注:使用 sonar:sonar 设置正常的 maven 构建步骤不是很舒服,因为每个作业都应手动配置并显式调用 SonarQube 服务器(包括完整的参数化)。
【问题讨论】:
标签: jenkins configuration sonarqube jenkins-plugins sonarqube-scan