Currently my team is using Jenkins to do automated builds that are triggered by SVN changes.
Recently, we decided we wanted to use Sonar. We don’t want to have the sonar/hudson integration occur for every single snapshot build. We just want it once a week or so.
Our team uses clean deploy -U instead of clean deploy site-deploy -U so simply using the periodical build to trigger sonar won’t be enough because it won’t have the site information from the build (such as the clover report).
My question is, in one job, is it possible to associate a different goal to different build times? I’m probably not being terribly clear. Can I associate a clean deploy -U to the build triggered by the SVN change but associate a ‘clean deploy site-deploy -U’ to a build triggered by the periodical build?
Are my only choices to
1. Convince everyone to have the site-deploy with every snapshot build (thus taking more time)
OR
2. Create a new job for the weekly build?
I have similar experience in the past at work here below is how i solved the issue.
Just a little setup for the tools you will need:
The problem we faced was should we run build with more tests which make the build time much longer, which slows down live testing of the tool we were making. Similar to the situation your facing. What we decided to do was to create two builds, once for the fast turn around with the developers and one that took longer that was run once as week, but with your situation you can simply use Sonar Plugins settings to solve your issue, you can have it triggered by manual build or SCM polls.
There are setting that you can control when the Sonar is run on the build, once you install the plugin, go to configure system.
I hope that was helpful, but it should result in the desired behavior with only one build. 🙂