sradi
sradi

Reputation: 71

Link to SonarQube on Jenkins job not available

on the main page of a Jenkins job, I see the SonarQube icon, which should be a link, but it's just text: Jenkins job page with missing link

I use...

After browsing the source code of the jenkins sonarqube-plugin, I found that SonarUtils.extractSonarProjectURLFromLogs() seems to be broken. It parses the console output for the regexp "ANALYSIS SUCCESSFUL, you can browse (.*)". My console output never prints this line. It just prints "ANALYSIS SUCCESSFUL".

Is this a known issue?

Upvotes: 3

Views: 4241

Answers (1)

From what I can see in your logs, you are running the analysis in "preview" mode:

... -Dsonar.analysis.mode=preview ...

As you can read on the documentation about preview mode:

The source code is analyzed but the measures and issues are not pushed to the SonarQube database. Therefore, they cannot be browsed through the web interface.

So this is normal that you only get a ANALYSIS SUCCESSFUL message without the related SQ URL (because results are not pushed to the server in preview mode).

Upvotes: 3

Related Questions