Server Fault is a question and answer site for system and network administrators. 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'm using hudson as my CI and it works great, builds run their tests, code metrics, all that good stuff. But at the moment, that's it, no automated deployment, I have to manually do that after. I haven't found any sort of capistrano plugin for hudson and I can't even see where I can just run my cap deploy after a successful build in Hudson.

Does anyone have any idea what I need in order to automate a deployment to a testing server on a successful build? I'd like each commit to force a build and in term deploy to testing so I can see everything right away.

share|improve this question
up vote 1 down vote accepted

Not sure what kind of job you created. However, I am working with Maven2 projects and I can add post build steps. With a freestyle project you can add additional build steps as well. Another option is that your job triggers another job which will run the deployment.

My assumption is that you have some kind of command line scripts, which you can use for deploying your project. These scripts can be called by Hudson.

share|improve this answer
I know that maven2 projects allow you to do some post-build deploys and whatnot, with cargo in particular. So ya, this is a freestyle project, and it certainly has post-build options, but I don't see anywhere that I can post-build with my own scripts. i just have options for posting test results and sending emails. Am I missing a certain plugin for this? I also thought about triggering another build, which I suppose could just be a branch creation and deploy, but it'd be nice to keep it in one project I think. – brad Dec 7 '09 at 15:47
because here's what I"m thinking. I'd like this build, on success, to create a branch with the build number and deploy from that branch so that it's not affected by any subsequent deploys, so i've frozen the version. I guess though that could all be accomplished in a "deploy build" of some sort? Is that typical behaviour in hudson? I'm pretty new to this. – brad Dec 7 '09 at 15:49
You say that you use a freestyle project. In that case just add additional build steps to call your scripts. I think Hudson only executes until it gets the first error and marks the job as unsuccessful. If you want to spilt the jobs and only trigger a second job I would recommend to use the "Hudson Parameterized Trigger plugin" to pass on additional data to your next job. I use it to build my artifacts, push them into a repository and the second job on a different machine picks these artifacts up and deploys them. – Peter Schuetze Dec 7 '09 at 21:54
i'll play around with that, thanks very much! – brad Dec 8 '09 at 14:36
So you're recommending to deploy as a build step? I would have thought a post-build step would have been appropriate. – brad Dec 8 '09 at 14:46

You should take a look at something like this -

Pushr is something I only discovered recently, but it is built on top of Capistrano -- its the answer to pretty much all your deployment needs (I inherited this project last year) - I have a 'railsless' deploy gem if you're not deploying a rails application, you can find that at

share|improve this answer
not exactly what i'm looking for. I'm looking for a post build deploy from hudson, i don't want it deployed on post-commit from git. – brad Nov 25 '09 at 20:50

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.