blog.relativt.net

Eirik's public note to self

1 December 2011

How to trigger a build in Jenkins for each commit in Mercurial

by Eirik Tenold

Just add the following to the hgrc file in the project’s hg directory:

[hooks]
commit.jenkins = java -jar <jenkins-cli.jar> -s http://<url>/ build -c <project name>

To get the jenkins-cli.jar file, follow the instructions in this post.

More information on Mercurial hooks can be found in Mercurial: The Definitive Guide.

tags: Java - Mercurial - Jenkins