Polling Subversion with Jenkins

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.

Using uberAPPS? Have your say on uberAPPS at the official forum!

3 Responses to “Polling Subversion with Jenkins”


Leave a Reply