So, after catching Sebastian Bergmann's tweet about the PHP Quality Assurance Tool-chain project I was at last reunited with an old goal of mine, to get some tools to oversee my mess (and there's plenty of it to go around).
Below are a few notes I took during the global installation process, applied to my reality (Ubuntu), it all went about well the first time, I had built setup related issues (they're in the notes down there, rookie mistakes and particular conditions) . They're straight out of my installation process, so there's no QA assurance on this post :) , either way, along with the website you'll be fine and on your way with getting the full tool-chain up and running :)
sudo pear config-set auto_discover 1 sudo pear install pear.phpqatools.org/phpqatools sudo pear channel-discover pear.phpdoc.org sudo pear install phpdoc/phpDocumentor-alpha sudo pear install channel://pear.php.net/Text_Highlighter-0.7.3
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - sudo vim /etc/apt/sources.list # Add the following line # deb http://pkg.jenkins-ci.org/debian binary/ sudo apt-get update sudo apt-get install jenkins
sudo pear install pear.phpqatools.org/phpqatools pear.netpirates.net/phpDox sudo pear install channel://pear.netpirates.net/phpDox-0.4.0
Had to manually update the Jenkins Plugins DB via the Web interface, the CLI interface doesn't seem to have an proper command
# Get the jenkins-cli jar file wget http://localhost:8080/jnlpJars/jenkins-cli.jar # Install the plugins java -jar jenkins-cli.jar -s http://localhost:8080 install-plugin analysis-core checkstyle cloverphp dry htmlpublisher jdepend plot pmd violations xunit git # Restart Jenkins java -jar jenkins-cli.jar -s http://localhost:8080 safe-restart
My Jenkins Home is: /var/lib/jenkins
cd $JENKINS_HOME/jobs sudo git clone git://github.com/sebastianbergmann/php-jenkins-template.git php-template sudo chown -R jenkins:nogroup php-template/
Also, make sure you have 'ant' installer
sudo apt-get install ant
chmod -R a+r *
cd $JENKINS_HOME/jobs/project/workspace sudo -u jenkins git config user.email "jenkins@localhost" sudo -u jenkins git config user.name "jenkins"
At this point, you're about ready to go, mind you, you have a pretty empty build right there (unless your project is already configured with build instructions of course), in any case, do check out this post since it will absolutely get you going with the proper build steps you need to take.
Now, all we need is quality software :)