Abhishek Anvekar
Abhishek Anvekar

Reputation: 418

Sonarqube Quality Gate status link in Azure devops Pull Request always points to localhost

The Quality gate status url in a PR is always pointing to localhost and not to the actual sonarqube server. The detailed analysis report link in the build pipeline is working fine. SonarQube 8.2 Enterprise Edition, Scanner Latest from Azure Devops Marketplace. Create a PR request and trigger a Build with Sonar Analysis. Add a Build policy to validate Sonar Quality Gate Click on the link. It routes to localhost and not the actual server.

enter image description here

When I click on “Quality Gate failed” hyperlink, it takes me to http://localhost/dashboard?id=***&pullRequest=952. Ideally it should point to the server where I have my sonarqube hosted.

Upvotes: 1

Views: 2000

Answers (2)

Abhishek Anvekar
Abhishek Anvekar

Reputation: 418

I found the resolution for this we need to go into Administration > General > Server base URL update the 'Server base URL'. on sonarqube portal.

Upvotes: 2

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51093

Make sure the following has been configured in SonarQube:

sonar.core.serverBaseURL is set to the base url of SonarQube including the port number.

Also double check if your proxy firewall which block the request from the SonarQube server to TFS.

Try to add your TFS server host name in “http.nonProxyHosts” in your “sonar.properties” file.

Otherwise, this may related to your TFS version. Try to upgrade to TFS 2018.Update3.2 and above.

More details take a look at this similar question: TFS Pull Request Decoration Not Working

Upvotes: 0

Related Questions