- http://jenkins-php.org/
- Information Collected from the following URL for my sanity:
The goal of this project is to provide a standard template for Jenkins jobs for PHP projects.
Simply follow these four steps to get started:
- Install the required Jenkins plugins and PHP tools
- Orchestrate the PHP tools using Apache Ant
- Configure the PHP tools for use with Jenkins job template
- Create a Jenkins job for your PHP project
Installation
Required Jenkins Plugins
You need to install the following plugins for Jenkins:
-
Checkstyle (for processing PHP_CodeSniffer logfiles in Checkstyle format)
-
Clover PHP (for processing PHPUnit's Clover XML logfile)
-
HTML Publisher (for publishing documentation generated by phpDox, for instance)
-
JDepend (for processing PHP_Depend logfiles in JDepend format)
-
Violations (for processing various logfiles)
-
Warnings (for processing PHP compiler warnings in the console log)
You can install these plugins using the web frontend at
http://localhost:8080/pluginManager/available
wget http://localhost:8080/jnlpJars/jenkins-cli.jar java -jar jenkins-cli.jar -s http://localhost:8080 install-plugin checkstyle cloverphp crap4j dry htmlpublisher jdepend plot pmd violations warnings xunit java -jar jenkins-cli.jar -s http://localhost:8080 safe-restart
If you see an error message such as "checkstyle is neither a valid file, URL, nor a plugin artifact name in the update center No update center data is retrieved yet", you need to update your plugin list manually:
curl -L https://updates.jenkins-ci.org/update-center.json | sed '1d;$d' | curl -X POST -H 'Accept: application/json' -d @- http://localhost:8080/updateCenter/byId/default/postBack
In the above, replace localhost:8080
with the hostname and port of your Jenkins installation.
Required PHP Tools
The following PHP tools are required:
We assume that these tools are on the $PATH
and can be invoked with phpunit
, phpcs
, phploc
, pdepend
, phpmd
, phpcpd
, and phpdox
, respectively. For instance because you have downloaded the respective PHP archives (PHAR) and put them into your $PATH
or because you have installed the tools globally using Composer.
- Log in to post comments