Configure Jenkins for PHP Projects

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

More Useful Jenkins Plugins for PHP Projects

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
DRY Plugin
Warnings Plugin

Install required tools on server


apt-get install ant
curl -sS | 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
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

About Wicem

Check Also

Configure Gatling Stress Tests command line for Jenkins

Install Gatling In order to let jenkins jobs run gatling bundle you should install the …

Leave a Reply

Your email address will not be published. Required fields are marked *