svnjenkinspost-commit-hook

PostCommit Hooks in Jenkins / SVN


I'm looking to implement post commit hooks in an SVN / Jenkins env (win), and it's something that I've never needed to do before. I've searched the site and further afield to try and further my understanding of how it works and I'm struggling a little. Initially I expected the hook, to be telling Jenkins to kick off a specific job, but on further investigation I'm not so sure. Am I right in thinking that all the hook does, is to tell Jenkins that 'something' has been committed to the repo. it does this by posting something like ... http://${SERVER}:${PORT}/subversion/${UUID}/notifyCommit?rev=$REV

does Jenkins, then fire all jobs ? or does Jenkins then for each job, check the repo to see if anything relevant has changed and then only fire those jobs ?

I've been trying to implement the Windows scripts found here : https://wiki.jenkins-ci.org/display/JENKINS/Subversion+Plugin

Does anyone know of a break down to this script on what it's actually doing ?


Solution

  • you are right, Jenkins URL Handler will trigger a call into Jenkins SVN Plugin, which then sorts out which Jobs to trigger (based on the Repository URL of job config page)