Thursday, December 1, 2011

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

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

[hooks]
commit.jenkins = java -jar <path to jenkins-cli.jar> -s http://<Jenkins 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.

0 comments:

Post a Comment