CHAPTER 20 ■ CONTINUOUS INTEGRATION
■Note A reminder of the CruiseControl environment: config.xml sits at the top level and handles application wide
configuration. Project specific build targets live in an Ant file at projects/userthing/build.xml. phpUnderControl
created the userthing directory and the build file on my behalf when I ran the phpuc project command.
Here’s the phpunit task, and some context.
<?xml version="1.0" encoding="UTF-8"?>
As you can see, this is just the same as a Phing document. It’s divided into target elements, which
relate to one another via their depends attributes. The phpunit task would fail as it stands. It’s calling
test/UserTest.php, but from the context of ${basedir}/source. In order to make this work, all I need do
is amend the exec element, so that it runs from ${basedir}/source/src.
Now, I’m about ready to run my project.
Running phpUnderControl / CruiseControl
First of all I need to restart CruiseControl:
$ kill cat cc.pid
$ ./cruisecontrol.sh
Now, I can see the results of my initial build by visiting http://localhost:8080/cruisecontrol. The
control panel should show that the userthing project has been added, and indicate the outcome of the
build. Clicking on the project name will call up the Overview screen.
You can see this screen in Figure 20–6.