詹金斯无法到达Sonarqube [英] Jenkins can't reach Sonarqube
问题描述
我目前正在尝试使我的Jenkins/Sonar集成正常工作.
I am currently trying to get my Jenkins/Sonar integration to work.
这是我所拥有的: 詹金斯在工作 Sonarqube正在工作(可从网络界面访问) 端口是开放的
Here is what I have: Jenkins is working Sonarqube is working (reachable from webinterface) Ports are open
但是! 我尝试了所有可能的设置,詹金斯坚持认为Sonarqube是Localhost:9000,无论我告诉它什么(即使这也应该起作用).这导致以下情况:
However! I tried all possible settings, Jenkins insists that Sonarqube is Localhost:9000, no matter what I tell it (and even if, this should work too). This leads to following:
并最终使构建失败. 我该如何纠正这个问题?
and ultimately lets the build fail. What could I try to rectify this?
推荐答案
localhost:9000
是默认的声纳qube url,与
localhost:9000
is the default sonar qube url, regarding the official documentation. You'll have to set the correct url in your pom.xml
(assuming you're ussing Maven, which seems to be the case).
如果使用正确的声纳qube url(例如:192.168.0.9)在pom.xml
或settings.xml
中设置sonar.host.url
属性,则它应该可以正常工作
if you set the sonar.host.url
property in your pom.xml
or settings.xml
with your correct sonar qube url (ie: 192.168.0.9 for example), it should work as expected
<properties>
<!-- Optional URL to server. Default value is http://localhost:9000 -->
<sonar.host.url>
http://myserver:9000
</sonar.host.url>
</properties>
这篇关于詹金斯无法到达Sonarqube的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!