In the past, I configured Sonar in Jenkins by doing "Add action after build → SonarQube".
Now when I do this, I get this warning:
Using the SonarQube maven builder is no longer recommended. It is preferable to configure SonarQube in the build environment and use the standard Jenkins maven target program.
To fix this, I use this Maven plugin
<plugin> <groupId>org.sonarsource.scanner.maven</groupId> <artifactId>sonar-maven-plugin</artifactId> <version>3.0.1</version> </plugin>
and in the Jenkins assignment I accomplish the following goals
-U clean test site sonar:sonar -Dsonar.host.url=http://my-sonar-server
Everything works flawlessly, except that the link to the SonarQube is missing from the sidebar on the job page.
When I check the log, I see the SonarQube link: -
[INFO] Analysis report generated in 162ms, dir size=52 KB [INFO] Analysis reports compressed in 47ms, zip size=27 KB [INFO] Analysis report uploaded in 81ms [INFO] ANALYSIS SUCCESSFUL, you can browse http:
It seems I can add do "Add build step → Invoke Standalone SonarQube Analysis", which will make this SonarQube link appear, but I need to specify all the analysis properties manually, and I find it very tedious since sonar-maven-plugin handles this easily for me.
My question is, using the sonar-maven-plugin and my goals above, how do I get Jenkins to display the SonarQube link in the sidebar of the job page?
I am using Jenkins 1.645 and SonarQube 5.3.