Try Hudson Instead of CruiseControl: The 3 Minute Setup

  1. Download winstone from it’s Sourceforge Files page
  2. Download the Hudson war file from its Java.net Release page
  3. Then run java -jar winstone-0.9.6.jar --warfile=hudson.war --httpPort=8081
  4. You should see something like the screenshot below.
  5. Play.

Hudson screenshot

One of my favorite features of Hudson is the ability to watch the console output of a build in progress, like this one:

Hudson console output

Other cool things include:

  • No more messing around with XML
  • I can setup a Hudson job and use it to run mvn release:clean release:prepare on my branch code. (Haven’t tried this beyond tinkering yet, though. Could possibly be manual or nightly job it seems.)
  • It’s easy to have several builds for different branches and see them all at once.
  • There’s a really cool build history graph that shows both the time it took to build each release, and whether it passed or failed — makes it easy to see your build trends on the team.

I’m looking forward to investigating it’s publishing of Javadoc and JUnit test results. I also want to see if it’ll do anything with Maven’s site generation. If so, that’d be a big win. I’ve fiddled with Continuum, but this just feels like a better setup to me, and the author seems eager to add Maven2 integration to it.

After having it around for a couple weeks, I’ve tentatively switch our build to use it. It’s just so easy to turn on, that it seems like a no brainer. If it doesn’t pan out then we can always turn CruiseControl back on, but I don’t anticipate that outcome. Something else I might try is to drop Hudson into Tomcat if winstone seems to strain, but I don’t think we’ll need that either. It’s built our stuff plenty fast in that little servlet container for a few weeks now, so I’m not anticipating any load increase to it — simply more publicity for it among our team.

Try it out. Let me know if you think it’s worth the switch.

5 Responses to “Try Hudson Instead of CruiseControl: The 3 Minute Setup”

  1. Is there any particular version of Hudson one should use? I just downloaded 1.79 and don’t seem to see any output in the browser at all (and no errors on the command line)…

  2. Luke Francl says:

    I set up Hudson for continuous integration at my last job and found it to be much more pleasant to use than CruiseControl. CC is hard to get working and has ugly results pages. Hudson, by contrast, is extremely simple to get going (no editing config files!).

  3. Thanks for this blog, and the great idea about quickly running Hudson. I took this even further and now running Hudson is even easier. See my post for details.

  4. tim says:

    Kohsuke — great move. Making Hudson easier to run is a great way to make it cheap to try out, and make it more likely that people will make the switch if it makes sense for them. :-)

  5. Ed Gibbs says:

    I flipped everything over to Hudson back in January and it’s been really smooth. Most of the developers appreciate it since they don’t have to go look at the XML in cruisecontrol. I’d say the only annoying thing is that I’d like to save some of the artifacts from each build like the Clover, JUnit, and Checkstyle reports, but Hudson blows away the old ones each time. I figure I can probably build a job to move these, but I haven’t bothered yet.

    One thing I did do was put in links on each project build page to the reports I want to see. With maven you can just link to the main surefire reports page.