CruiseControl is a framework for a continuous build process. It includes, but is not limited to, plugins for email notification, Ant, and various source control tools. A web interface is provided to view the details of the current and previous builds.
- CruiseControl website
Prerequisites:
You have to have the following installed:
- Java 1.5
- Ant 1.6.5 or later
- Maven 1.0.2
- Subversion 1.3.x or 1.4.x
Getting the CruiseControl source code:
- http://cruisecontrol.sourceforge.net/download.html
- I chose v2.6 (Jan. 11, 2007)cruisecontrol-src-2.6.zip
Unpack the downloaded cruisecontrol source. I place it in ~/local/
- cd ~/local
- unzip cruisecontrol-src-2.6.zip
Making sure ant has access to junit.jar
- mdkir -p ~/.ant/lib
Download junit from here:
After unzipping the file, locate junit-4.1.jar and copy it to:
- ~/.ant/lib
Now, go to the curiscontrol directory and build it:
- cd ~/local/cruisecontrol-2.6/
- ant
The build will take a couple of minutes. In order to test the build, execute:
- java -jar ~/local/cruisecontrol-2.6/main/dist/cruisecontrol-launcher.jar
- It should show a bunch of usage messages
Setting up and running the Build Loop
- First we need to setup the work directories
- mkdir -p ~/local/work/cruise
- cd ~/local/work/cruise
- mkdir checkout
- mkdir logs
- mkdir artifacts
Checking out Sakai
- cd ~/local/work/checkout
- svn co https://source.sakaiproject.org/svn/sakai/branches/sakai_2-3-x
- Note: For UCD, we would checkout the following: https://mware.ucdavis.edu/svn/ucd-sakai/sakai/branches/sakai_2-3-x
Create a Delegating Build Script
- Create an ant script called "build-sakai_2-3-x.xml in ~/local/work
Code Block <!-- Delegating build script, used by cruisecontrol to build sakai_2-3-x. Note that the basedir is set to the checked out project --> <project name="build-sakai_2-3-x" default="build" basedir="checkout/sakai_2-3-x"> <target name="build"> <!-- Get the latest from CVS --> <cvs command="up -d -P"/> <!-- Call the target that does everything --> <ant antfile="build.xml" target="build-everything"/> </target> </project>