This plugin integrates the Mercurial version control system with Jenkins.
With this plugin, you can designate a Mercurial repository as the "upstream" repository. Every build will then run something like hg pull -u to bring the tip of this upstream repository. In a similar manner, polling will check if the upstream repository contains any new changes, and use that as the triggering condition of the new build. This plugin is currently intended to support Mercurial 1.0 and later.
Viewers included are bitbucket, fisheye, google-code, hgweb, kiln, and rhodecode.
As of version 1.38 it's possible to trigger builds using push notifications instead of polling. In your repository's .hg/hgrc file add:
This will scan all the jobs that's configured to check out the specified URL, and if they are also configured with polling, it'll immediately trigger the polling (and if that finds a change worth a build, a build will be triggered in turn.)
This allows a script to remain the same when jobs come and go in Jenkins. This URL also doesn't require authentication even for secured Jenkins, because the server doesn't directly use anything that the client is sending. It runs polling to verify that there is a change, before it actually starts a build.
When successful, this will return the list of projects that it triggered polling as a response.
There are some caveats to running TortoiseHG on windows, particularly with ssh. Here are some notes to help.
Example, from a command prompt:
Click 'Yes' on the host key dialog. You can then cancel the next dialog prompting for password.
Main Configuration, Step by Step:
3. Save the configuration.
Example SSH URL:
Other Windows+TortoiseHG+ssh notes:
TortoiseHG integrates directly with pageant/putty for it's ssh connections, and the toolkit in jenkins only calls the executable, so it looks like:
Jenkins -> Mercurial Plugin -> TortoiseHG > plink/pageant
Therefore, Jenkins has no direct influence on the SSH key setup for the user. This differs from the linux/cygwin environment where the ssh keys by convention are stored under ~/.ssh.
The plugin exposes two new environment variables that can be used in build steps:
The plugin supports generic tool auto-installation methods for your Mercurial installation, though it does not publish a catalog of Mercurial versions. For users of Linux machines (with Python preinstalled), you can use ArchLinux packages. For example, in /configure under Mercurial installations, add a Mercurial installation with whatever Name you like, Executable = INSTALLATION/bin/hg, Install automatically, Run Command, Label = linux (if desired to limit this to slaves configured with the same label), Command = [ -d usr ] || wget -q -O - http://www.archlinux.org/packages/extra/i686/mercurial/download/ | xzcat | tar xvf - (or …/x86_64/… for 64-bit slaves), Tool Home = usr, and configure a job with this installation tied to a Linux slave.
All changes in beta 1 & 2 plus:
Skip to end of metadata Go to start of metadata