问题
I am currently trying to get my Jenkins/Sonar integration to work.
Here is what I have: Jenkins is working Sonarqube is working (reachable from webinterface) Ports are open
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?
回答1:
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).
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>
来源:https://stackoverflow.com/questions/38995148/jenkins-cant-reach-sonarqube