Labels

continuous integration (9) jenkins (9) hudson (7) mac os x (5) maven (5) git (4) android (3) charles (3) launchd (3) scm (3) bitbucket (2) dvcs (2) jnlp (2) mercurial (2) python (2) ant (1) apple (1) basex (1) chrome (1) cloud server (1) cobertura (1) css (1) cvs (1) firefox (1) general (1) hardy (1) http (1) iptables (1) java (1) javascript (1) linux (1) lucid (1) stresstest (1) subversion (1) svn (1) ubuntu (1) xen (1) xml (1) xpath (1) yui2 (1)

2010/06/18

Triggering Hudson builds with Mercurial hooks - a variation

Ashlux writes about triggering Hudson builds with Mercurial hooks on his blog. The basic hook described is:

[hooks]
changegroup.hudson = curl http://hudson_url/job/project_name/build?delay=0sec

I use this technique as well a lot with two refinements:

  1. I use polling instead of build. So the url is http://hudson_url/job/project_name/polling. This will poll your Mercurial repository and only if something really changed, the build will be triggered.
  2. Instead of setting up authentication I always use the TOKEN approach described on Remote access API, so the url gets http://hudson_url/job/project_name/polling?token=TOKEN

Using tokens you do not need to submit any authentication information. Bitbucket offers a POST service which you may use instead of the aforementioned hook. Github offers a similar service.

0 comments:

Post a Comment