Tuesday, August 11, 2009

Cruise Control and PHPUnderControl on Ubuntu 9.04

Most of this was stolen from http://no-names.biz/2008/06/09/cruisecontrol-and-phpundercontrol-in-debian-etch/ and http://confluence.public.thoughtworks.org/display/CC/Getting+Started+With+CruiseControl.

1.) Install the sun's java 6 runtime via `sudo apt-get install sun-java6-bin`. I had to enable the multiverse repositories by editing my /etc/apt/sources.list and adding multiverse to the end of every line.
2.) Add 'JAVA_HOME="/usr/lib/jvm/java-6-openjdk/jre/"' into /etc/environment and run `source /etc/environment`.
3.) Download the Cruise Control binary into opt by running `wget http://switch.dl.sourceforge.net/sourceforge/cruisecontrol/cruisecontrol-bin-2.7.2.zip`
4.) Unzip and make a link to /opt/cruisecontrol.
5.) Install php-pear via `sudo apt-get install php-pear`.
6.) Install php under control and phpunit via pear by running:

pear config-set preferred_state beta
pear channel-discover components.ez.no
pear install -a ezc/Graph
pear channel-discover pear.phpunit.de
pear install --alldeps phpunit/phpUnderControl

Note: When running the last command php's cli let me know it ran out of memory. I edited /etc/php5/cli/php.ini and changed memory_limit from 32M to 512M. I changed this back after the installation was complete.
7.) Run `phpuc install /opt/cruisecontrol` to get phpUnderControl setup in cruise control.
8.) Go into /opt/cruisecontrol/projects and copy the connectfour directory to the name of your project.
9.) go into the directory you just created and delete everything under the src directory. Checkout your subversion repository here.
10.) Edit your build.xml file to look like:









11.) Now run `../../apache-ant-1.7.0/bin/ant checkout` and you should see:

Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-sun-1.6.0.14/lib/tools.jar
Buildfile: build.xml

checkout:
[exec] At revision 4347.

BUILD SUCCESSFUL
Total time: 1 second

1 comment:

  1. To look like what?! Great post this is awesome, and exactly what I was looking for thanks so much! But step 10, edit the build.xml to look like what... there is just blank space... You need to escape the characters so that they show up. Currently its just in the source ;) gotta use > <

    ReplyDelete