Here a summary of steps and instructions for preparing a continuous integration platform for PHP projects using jenkins.
You can review last post to set up a Linux integration server. I’m using Sebastian Bergmann website to initialize my platform
Install required jenkins plugins
Clover PHP Plugin
xUnit Plugin
JDepend Plugin
Static Analysis Utilities
Analysis Collector Plugin
Checkstyle Plugin
PMD Plugin
Plot Plugin
HTML Publisher Plugin
Crap4J Plugin
Violations
DRY Plugin
Warnings Plugin
Install required tools on server
apt-get install ant curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer apt-get install nodejs apt-get install npm npm install -g bower ln -s /usr/bin/nodejs /usr/bin/node apt-get install php5-curl php5-xsl php5-sqlite php5-xdebug
Creation PHP Jenkins Job
cd /var/lib/jenkins/jobs/ mkdir php-template cd php-template wget https://raw.github.com/sebastianbergmann/php-jenkins-template/master/config.xml cd .. chown -R jenkins:jenkins php-template/
Connect to jenkins manage page and reload configuration. You should get a job named php-template in the list.
Create your specific project job by a copy of php-template