Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a set of Python projects which are under the mercurial VCS. I would like to automate the following tasks:

  • Run the test suite for every commit (CI).
  • Make a source distribution for every commit, which has a tag in mercurial. This is regarded as a new release.
  • Copy the distribution to a special repository.

There is Jenkins as a proposal for similar questions, but I'm not sure if it can handle the release management like intended.

share|improve this question
Can you write a script that can do the steps you need, or is human intervention needed? – user1249 Apr 23 '12 at 6:04
The point is that I want a full or at least half automated solution and not to script the requirements from scratch. But it seems there is no such solution... – schlamar Apr 25 '12 at 6:10
The question was if the current workflow could be scripted or not. If not, you are not ready yet for a CI-engine. – user1249 Apr 25 '12 at 7:10
Yes, of course. Already using tox to test with multiple python versions. – schlamar Apr 26 '12 at 12:39
If you can script it, jenkins can do it. – user1249 Apr 26 '12 at 13:11

I've used CCNet to do this kind of thing, with a config triggered by a commit that runs a few jobs (the tests are quite easy to add to this). It works nicely with mercurial; which is what I use in my scripts. It gets the latest version from the repo, builds it, then deploys the files using WebDeploy. I have used RoboCopy for this in the past.

See this post for full script:

share|improve this answer
This seems so complex that an own script would be simpler and faster to set up. – schlamar Mar 25 '12 at 17:44
I use that script to manage all our deployments, so it is more complex than a one off / bespoke script would be - but it does let you simply plug as many projects in as you like. Most of the complexity comes from keeping the script DRY in order to make it easy to reuse blocks. If you're only going to run a single project then inline all the blocks, it will be a big long script but maybe easier to follow...? – Simon Martin Mar 26 '12 at 16:45

At a previous job, we had a locked down "central" server (I know, central server for a distributed RCS sounds funny) that didn't allow direct login except by admins. Users could only clone / pull from it. Admins did the pushing. I'm not sure if hooks were used, but we sent automated emails and accomplished the permissions using the hgadmin tools.

If you set this up you could install your own hooks on that machine (see to perform the actions you're talking about - accept pushes that pass the tests, run a build script, and a copy it out if everything goes according to plan (see the changegroup hook).

Or you could install some continuous integration software on your server, but you'll end up paying for that. We're about to start using Bamboo by Jira (see - they do have a free trial), but I can't speak for any at the moment.

share|improve this answer
I know that I can build such a system on my own but I would like to use an existing solution (if possible). – schlamar Mar 25 '12 at 17:43
I found Bamboo to be too little intuitive. Jenkins had good support for our current workflow. – user1249 Apr 26 '12 at 14:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.