我有以下情况:
服务器配置: Jenkins .2.7.1,SonarQube插件2.4.4
我的工作是使用SonarQube检查一些质量措施。SonarQube服务器在Jenkins中配置良好,运行良好。
到目前为止,我使用SonarQube扫描仪作为post构建步骤,但现在不建议这样做。
然后我改变这个来建立步骤然后..。
..。配置SonarQube扫描仪后的生成步骤
SonarCube扫描仪配置
我开始建立工作,然后我得到:
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。
在页面用SonarQube扫描仪进行分析上,没有关于这种背景下的自动下载以及如何配置它的内容。
以下是我在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扫描仪的方法了吗?
备注:用声纳设置正常的maven构建步骤:声纳不是很舒服,因为每项工作都应该手动配置,并且应该显式地调用SonarQube服务器(包括完全参数化)。
发布于 2016-09-27 15:22:35
对于您的问题:您可以手动下载SonarQube扫描仪,方法是将它放在您的Jenkins服务器/奴隶上,并在Global (Jenkins > Manage >ConfigreSystems)中配置到它的路径。当您取消选中“安装自动”时,您将看到配置路径的输入。
对于您的情况:如果您以前使用的是,那么您是在谈论Maven作业。您说您不想使用标准的mvn构建步骤,因为每个作业都需要配置。我认为,将Maven作业切换到使用SonarQube扫描仪会带来更大的配置负担:现在必须手动配置每个分析属性,而不是让它们从pom中自动读取。
与之相比,
sonar:sonar -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_AUTH_TOKEN好像是鸡饲料。
https://stackoverflow.com/questions/39727173
复制相似问题