In my current position, we use perl extensively. There isn’t much of a build process — check out the code, set a couple variables, run a suite of tests. (There is always the perl -c command line option which will perform a syntax check but I want something more exhaustive.) A former colleague of mind pointed me at Hudson, a tool they recently started using. They are a java shop and Hudson is definitely aimed at java shops. Below are the details of my initial experience with Hudson.

Proof of Concept

I downloaded the Hudson WAR file (version 1.176) to my desktop machine. From a command line prompt, I launched Hudson with the command java -jar hudson.jar. I minimized the command prompt window and launched my browser to the default http:\\localhost:8080 which displays the Hudson configuration pages. Here, I created a new job and filled in the following:

  • Project Name
  • Project Description
  • Subversion Repository URL
  • WebSVN URL
  • Set up poll SCM (check for updates) on once a minute schedule)
  • Selected execute Windows batch commands with the necessary commands to run my perl tests
  • Select email notification

That is pretty much what ot took to get up and running. I had a few mistakes in the commands under “Windows Batch Commands” but once that was complete, I was able to get a successful build. (Here successful is defined as the last command executed returning with a non-zero exit code.) The email did not work at first. I needed to go back to the home page and select “Manage Hudson”, “System Configuration” to then set up my email server credentials.

I thought all was well until my first unattended build. The build failed with the message “ERROR: Failed to update…” from the Subversion checkout. I did some research and found some references to the same error in one of the packages that Hudson uses. There was a suggested fix but it required I code change. I filed a bug and a new build was available within a couple of days which fixed my problem.

Move into Production

After running the build on my local machine for a few days, I decided it was worth moving into our normal processes. I installed it on a Windows server. There is a good description on how to setup Hudson as a Windows service in the Hudson wiki.

We have been running Hudson now for a few weeks and I am very pleased. Highly recommended.