Configurer Jenkins pour PHP

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

Install required tools on server

Ant
Composer

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

About Wicem

Check Also

Configurer Jenkins pour les tests de charges/intégration avec Gatling

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

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *