3

I have configured Jenkins and created a job to checkout, build and run a simple project from SVN. I could configure this job to run periodically, like once every five minutes. But I'd like it to build the project only when something has changed on the SVN repository. I read the "Builds by source changes" section of this document, but could not figure out what exactly I am meant to do! Any help would be appreciated!

B Faley
  • 17,120
  • 43
  • 133
  • 223

3 Answers3

3

When you configure your job you have to do this:

  1. In the Source Code Management specify the source management system you use (for instance SVN) and fill all required fields (url, authentication, ...) (probably already done since you are able to do a checkout)

  2. in the Build Triggers section : choose Poll SCM with a schedule */10 * * * * for checking the repository every 10 minutes.

ben75
  • 29,217
  • 10
  • 88
  • 134
1

Go to the configuration of your project and scroll down to the Build Triggers directly under the Source Code Management section. Here you've to configure it this way:

enter image description here

The syntax to schedule the job is in the crontab format take a look here.

Atropo
  • 12,231
  • 6
  • 49
  • 62
1

what you are looking for is Subversion post commit hook that will execute what ever you script in your hook script. Take a look at the following example by Mike West:

Mike West - Subversion Post-commit-hook

good luck!

atlasloewenherz
  • 341
  • 2
  • 11