A few minutes ago I have released the latest phpUnderControl 0.4.0 version. In addition to many minor fixes and improvements this version comes with three utility commands, that should simplify some common tasks.
1) Project delete
The project delete command provides a simple way to delete a complete project with all its contents, including logs, artifacts and sources, from your CruiseControl installation.
[mapi@arwen~]$ phpuc delete --project-name connectfour /opt/cruisecontrol
2) Project clean
I do not really like this feature, because I really dislike the idea to delete old builds and artifacts, but I must admit that I have mounted a 100 GB partition as artifacts directory. Due to the fact that this feature was requested by many phpUnderControl users, it is implemented in phpUnderControl 0.4.0.
This command allows you to delete old logs and artifacts except a configurable number of the latests builds. The following command will remove all build results for the php-under-control except the last 20 builds.
[mapi@arwen~]$ phpuc clean --project-name php-under-control \
--keep-builds 20 /opt/cruisecontrol
3) Project create
The project create command provides a cli wizard to set up a new CruiseControl project. The following command will create a new project for the PHPUnit BankAccount sample, checkout the latest svn version, create the required directories and finally prepare the ant build.xml and the CruiseControl config.xml. If you don't like XML or you have multiple projects, that share a common source/project layout, this command could be useful for you.
[mapi@arwen~]$ phpuc project --version-control svn \
--version-control-url svn://svn.phpunit.de/.. \
--project-name BankAccount2 \
--source-dir . \
--test-case BankAccountTest \
--test-dir . \
--test-file BankAccountTest.php \
--schedule-interval 20 \
/opt/cruisecontrol
But I would always recommend to use the example build.xml and config.xml to set up a new project. Both files are completely documented and contain links to the original CruiseControl configuration reference.
I will do my best to complete the missing documentation for the CruiseControl config.xml file and the new cli commands. Any help is welcome.