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.


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.

  • 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
  • 1
    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
  • 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
  • The broad idea behind splitting a job is described in the following article. wiki.hudson-ci.org/display/HUDSON/… However, my issue was that building and deployment where supposed to run on different machines. Since, I haven't found a way to run a parts of a job on one machine and the rest on a second machine, I was stuck with more than one job. – Peter Schuetze Dec 14 '09 at 17:31

You should take a look at something like this - github.com/karmi/pushr.

Pushr is something I only discovered recently, but it is built on top of Capistrano github.com/capistrano/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 github.com/leehambley/

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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