Reputation: 11
I am unable to add Sonar as a post build action in Jenkins. When I try to add build action, I get the option "Execute SonarQube Scanner" but when I try to add post-build action, I dont get that option. Jenkins version - 2.39 SonarQube version - 5.6 SonarQube Scanner for jenkins plugin - 2.5
Upvotes: 0
Views: 3128
Reputation: 22804
The Post Build Action is deprecated. You should use build steps. In this case, simply put the desired build step at the end of your build.
Upvotes: 1
Reputation: 10382
I think the best way to launch a Sonar analysis is to call Sonar as a Maven goal.
Here are my settings on Jenkins 1.6.
Build environnement section:
Maven goals:
mvn clean -U install findbugs:findbugs $SONAR_MAVEN_GOAL -Dsonar.host.url=$SONAR_HOST_URL
And of course, you have to configure your Sonar instance in the global settings:
Upvotes: 1