Kicking off a Jenkins/Hudson build on SVN commit

This is something that a lot of people out there like to do when you’re code contains automated tests. There are two options available to you which are:

1) Get Jenkins/Hudson to poll the SVN server to look for changes.
2) Notify the build server when changes are made on the SVN server.

Option 1 is a lot easier to do than option 2, mainly because it can be done out of the box. This works fine if you are happy for the server to poll SVN every few minutes and you can wait.

– If you want to poll SVN every 2 minutes say, then go to the configuration page for your build task in Jenkins.
– Scroll down until you get to the “Build Triggers” section.
– Tick the Poll SCM and enter “H/2 * * * *” into the Schedule section.
– Click Save.

Option 2 is required if you want the server to be more responsive to changes in SVN. There are instructions on how to do this here, look for the Post Commit Hooks section.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s