Hudson monitors executions of repeated jobs, such as building a software project or jobs run by cron. Among those things, current Hudson focuses on the following two jobs:
- Building/testing software projects continuously, just like CruiseControl or DamageControl. In a nutshell, Hudson provides an easy-to-use so-called continuous integration system, making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. The automated, continuous build increases the productivity.
- Monitoring executions of externally-run jobs, such as cron jobs and procmail jobs, even those that are run on a remote machine. For example, with cron, all you receive is regular e-mails that capture the output, and it is up to you to look at them diligently and notice when it broke. Hudson keeps those outputs and makes it easy for you to notice when something is wrong.
Install Hudson for testing is really simple, just download it an start the server:
java -jar hudson.war -httpPort=9000 &
Open http://localhost:9000 with your browser
Hudson and Git
Hudson has an extensive support for Source Code Management provided through plugin.
Go to manage plugin and install the git plugin.
Now when you create a new job you can set your git repository and select which branch to build:
The last thing to do is build you software. I'm using qt and cmake to build an my project. There is a hudson plugin for cmake but I prefer to use shell commands:
Note that all shell commands are relative to the $WORKSPACE variable. In the example I use "env" to show my environment.
Cmake use qmake in your PATH to find the QT framework so we set the PATH variable using a parameterized build:
That's all. If you wanna try here there is a small example using qt, cmake and git.
In the next post I want to integrate a test suite and make hudson run it.