Dashboard > IT Stuff > Home > PHP on Cruise
  IT Stuff Log In   View a printable version of the current page.  
  PHP on Cruise
Added by Sebastian Nohn, last edited by Sebastian Nohn on 2007-05-30  (view change)
Labels: 
(None)

Introduction

PHP on Cruise is a CruiseControl config set for controlling the PHP QA process with CruiseControl. The status quo of PHP QA is that some people download release candidates, run make test, send the results to the PHP QA mailing list and these mails are then ignorered by everyone.

Basically, PHP on Cruise fetches the latest version of the CVS (stable) tree, compiles it with your standard configure options and runs some unit tests. If these tests pass, you should be fine with the next version. If these tests fail, either PHP has been broken, or your application uses deprecated stuff or uses bugs as features. If the latter is the case, you have enough time to fix your application (you should by the way think about setting up continuous builds for your own project). If not, you should report the issue at http://bugs.php.net/ to make PHP better.

By default, PHP on Cruise tests PHP compatibility to this software:

  • Zend Framework 0.8.0 (the most recent one that isn't broken itself)
  • PHPUnit 3.0.6 (the most recent stable version when this document was last updated)

Getting Started

This chapter describes how to get started with PHP on Cruise.

Basic Requirements

PHP on Cruise runs on CruiseControl that runs on Java. Find Java on http://java.sun.com/ and CruiseControl on http://cruisecontrol.sourceforge.net/.

We assume, you already have a Java running on your machine.

We recommend you to create a separate user and group for CruiseControl:

root# groupadd cruise
root# useradd -m -d /opt/cruisecontrol -g cruise -c "CruiseControl User" cruise
root# su - cruise
cruise$ wget http://mesh.dl.sourceforge.net/sourceforge/cruisecontrol/cruisecontrol-bin-2.6.1.zip
cruise$ unzip cruisecontrol-bin-2.6.1.zip
cruise$ ln -s cruisecontrol-bin-2.6.1 cruisecontrol .

Please make sure that you have the tools listed on http://www.php.net/anoncvs.php installed on your machine before continuing. You may find instructions for your OS here: Building PHP from CVS.

Prepare the Cruise

If you just want to play around or just let PHP cruise, you should checkout the working directory as user cruise in home of user cruise:

cruise$ cd cruisecontrol
cruise$ rm -rf projects/
cruise$ svn checkout http://subversion.nohn.net/repos/OSS.PHP.Cruise/5.Src/prepared/dot .
Password for 'cruise': (<enter>)
Username: svnread <enter>
Password for 'svnread': <enter>
cruise$ cp config.xml.dist \
           config.xml
cruise$ cp projects/PHP_5_2/build.xml.dist \
           projects/PHP_5_2/build.xml
cruise$ cp projects/PHP_5_2/build.properties.dist \
           projects/PHP_5_2/build.properties
cruise$ cp projects/PHP_5_2/slash/opt/php/lib/php.ini.dist \
           projects/PHP_5_2/slash/opt/php/lib/php.ini
cruise$ mkdir -p projects/PHP_5_2/build/logs

Edit config.xml to fit your server name and email address.

Before the first run, you need to bootstrap your first PHP to install PHPUnit:

cruise$ cd projects/PHP_5_2/
cruise$ mkdir -p slash/opt/php/
cruise$ mkdir -p slash/etc/opt/php/
cruise$ mkdir -p slash/var/opt/php/
cruise$ cvs -d :pserver:cvsread@cvs.php.net:/repository login
CVS password: <enter>
cruise$ cvs -d :pserver:cvsread@cvs.php.net:/repository checkout -r PHP_5_2 php5
cruise$ cd php5
cruise$ ./buildconf
cruise$ ./configure \
   --prefix=/opt/cruisecontrol/cruisecontrol/projects/PHP_5_2/slash/opt/php \
   --sysconfdir=/opt/cruisecontrol/cruisecontrol/projects/PHP_5_2/slash/etc/opt/php \
   --sharedstatedir=/opt/cruisecontrol/cruisecontrol/projects/PHP_5_2/slash/var/opt/php \
   --disable-cgi --enable-cli
cruise$ make; make install
cruise$ cd ../slash/opt/php/bin
cruise$ ./pear channel-discover pear.phpunit.de
cruise$ ./pear install phpunit/phpunit

Finally you should edit your build.properties (should be self-explanatory) to be ready to cruise!

cruise$ cd ~/cruisecontrol/
cruise$ ./cruisecontrol.sh

Participating in the PHP QA Team

If your PHP is on the cruise, it's easy to participate in the PHP QA Team. Report failed builds to the PHP Internals List or via the PHP Bug Tracker. If you run the provided PHP testsuite (make test), which is easy by commenting in this section in build.xml, please never do that unattended. Subscribe to the Quality Assurance List and see, if there are questions regarding the results of your test run.

Include your projects in the cruise

to be written.

Building PHP from CVS (IT Stuff)
Java (IT Stuff)

This site is powered by a free Atlassian Confluence Personal Server License. Evaluate Confluence for your organisation or read more about Confluence licensing here.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.8 Build:#525 2006-08-08) - Bug/feature request - Contact Administrators