0
votes

I am using the sonar ant task jar for sonar analysis so I setup it in the project-properties.xml and create an Ant build step in jenkins. When I build the job, the analysis works fine and I am able to see the results in the sonarqube server, but in jenkins no link to SonarQube is visible.

Do I really need to install the SonarQube plugin for the link to be visible for the job?

1

1 Answers

1
votes

See also how to publish sonar result in jenkins server, or do we have sonar-report jenkins plugin

Normally you let SonarQube handle the code analysis on it's own and not by the Ant task (in the Jenkins job).

The Jenkins plug-in is there to trigger Sonar, to get latest sources (from the SCM) and run the analysis.

The results, are then made available on Sonar, but the Jenkins project, will provide a link to the results.

Workaround

There is (for as far as I know) no way to add a link, to an external generated report. What could be done, is add a simple HTML page, with a link to the Sonar server, to the project. And publish that simple HTML page, with the HTML Publisher Plugin.