I\'ve been working on this project for about a week now and I\'ve been searching for 2 days without any clear explanation online. For a school assignment, we need to set up
The most efficient way to trigger builds on Jenkins after someone pushed to your repo is using the changegroup hook in mecurial.
Jenkins on the other hand allows builds to be triggered remotely by calling the URL of your job with a special token. This trigger with the corresponding token has to be configured in your job on Jenkins:
The mercurial hook that will be put in the repos .hg/hgrc file can be defined like:
[hooks]
changegroup = curl --silent http://your.jenkins.server.url/jenkins/job//build?token=Foo
This hook uses the curl command line tool to call the URL of your jenkins job with the defined token that allows to trigger the job remotely. Curl has to be installed on your linux box of course.