Setting up a Php Continuous integration environment in Centos 6

As part of my job I need to create a continuous integration environment for my develops in Php.

first I installed Gitlab and then I installed Jenkins using the web page tutorial ( http://jenkins-ci.org/ ).

you need to have enabled EPEL repos http://fedoraproject.org/wiki/EPEL and rpm Fusion repos聽http://rpmfusion.org/ .

when you have Jenkins installed you will need install the needed packages open a root terminal and write:

yum install ant php php-phpunit-phploc php-pdepend-PHP-Depend.noarch php-phpmd-PHP-PMD.noarch php-phpunit-phpcpd.noarch php-phpunit-phploc.noarch php-pear-PHP-CodeSniffer.noarch php-phpunit-PHP-CodeBrowser.noarch

The next step is add the php template into Jenkins CI

  • 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/
  • /etc/init.d/jenkins restart

now we can create a new php project based on the php-template 馃檪

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.