DevOps Zone is brought to you in partnership with:

Jessica Thornsby is the Technical and Creative Copywriter at WANdisco, where she writers regular tutorials on Apache Subversion, TortoiseSVN, uberSVN, and all things version control. She spends her spare time editing the CD reviews section at www.leedsmusicscene.net, contributing to A Short Fanzine About Rocking, and researching her family tree. You can find her on Twitter @jthornsby Jessica is a DZone MVB and is not an employee of DZone and has posted 29 posts at DZone. You can read more from them at their website. View Full User Profile

Polling Subversion with Jenkins

02.18.2012
| 15560 views |
  • submit to reddit

There are many advantages Jenkins can offer Apache Subversion users, one of which is the option of automatically polling Subversion repositories for changes, and creating a new build whenever changes are detected. Implementing this functionality is made easy with our free, open ALM platform for Subversion, uberSVN. In this tutorial, we show you how to configure Jenkins to poll a Subversion repository once every five minutes.

1. To automatically poll a Subversion repository, you must first have created at least one Jenkins job. To get started, click on the desired Jenkins job from within uberSVN’s ‘Jenkins’ tab.

2. On the next screen, click ‘Configure.’

3. Select ‘Subversion modules’ and enter the URL of the repository you want Jenkins to poll.

4. Under the ‘Build Triggers’ heading, select ‘Poll SCM Schedule.’ A new text box will open, where you can enter how often you want Jenkins to poll the repository. In this example, Jenkins will poll the Subversion repository every five minutes. Alternatively, you can specify particular dates and times, using the following formula:

MINUTE HOUR DOM MONTH DOW

MINUTE: Minutes within the hour (0-59)
HOUR: The hour of the day (0-23)
DOM: The day of the month (1-31)
MONTH: The month (1-12)
DOW: The day of the week (0-7) where 0 and 7 are Sunday.

Note that each item must be separated by TAB or whitespace.

5. When you have entered all this information, click ‘Save’ and Jenkins will begin automatically polling Subversion.

6. If you want to check the polling process is working, make some changes to your working copy and then commit them back to the repository as normal. Now go back to your Jenkins job and select the ‘Subversion Polling Log’ option.

7. You will see that Jenkins has detected the changes and automatically created a new build (in this example, Build 6.)

8. If you need to check exactly what has changed in this build, click on the build’s link in the ‘Build History’ box.

9. Click on the ‘Detail’ link to be taken to the ‘Changes Summary’ page.

10. On this page, you will see the list of changes made in this build, including files that have been added, deleted, or modified. You have now successfully set Jenkins to poll your repository!

Jenkins is available for free through uberSVN. Visit http://www.ubersvn.com/ now to download uberSVN. A professional support option for Jenkins is also available.


Source: http://blogs.wandisco.com/2012/01/31/polling-subversion-with-jenkins/

Published at DZone with permission of Jessica Thornsby, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Paul Russel replied on Sun, 2012/06/10 - 7:49am

Nice post. I think every developer should know how to configure Jenkins/Hudson and you showed it so well. Thanks!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.