views:

290

answers:

1

We are using Hudson for continuous integration of many projects. I would like to know if there is an existing plugin or script that would automatically detect if a job needs to be built - but not actually build it, just send an email, add the job to a queue somewhere, or "flag" the build if it detects if the SVN repository modules have been updated. It should send one alert (or set a flag somewhere) per different job.

The goal is to know which projects have been updated and need redeploying. We have many different projects, and they need to be promoted (in QA, then production) as soon as possible after a code change. This, in order to minimize the time between the last commit and the deployment time, and therefore the risk that a regression goes undetected for too long.

+2  A: 

Haven't seen something like this yet. However, How about you create a new job (freestyle) which runs the necessary commands against SVN (shell script). Don't configure a SVN repository for this job, otherwise Hudson will check the source code out (we want to avoid that since it is unnecessary). Your script compares the current revision of the project with the revision of the last build (must be stored somewhere by the building job) and sets the errorcode depending on whether it is a different revision or not. If it is different your job will fail, sent out the necessary emails and Flags your job as failed. So you have both the flag and the email.

Peter Schuetze
I think this would work. It sounds like a lot of work to maintain though... We currently have about 30 projects, most of them with multiple SVN modules: this would mean at least 60 jobs with duplicate SVN module configs..... I would love to hear about an easier solution.
Olivier Gourment
May be you should think about adding a post commit hook to subversion. That might be easier.
Peter Schuetze