Template for Jenkins Jobs for PHP Projects

The Template for Jenkins Jobs for PHP Projects makes it easy to quickly set up a new job for a PHP project in Jenkins by removing the need to manually configure the post build actions. Here is how you use it:

  1. Go into Jenkins' jobs directory and check out the php-jenkins-template project from its Git repository:

    cd $JENKINS_HOME/jobs
    git clone git://github.com/sebastianbergmann/php-jenkins-template.git php-template
    chown -R jenkins:nogroup php-template/
  2. Reload Jenkins' configuration, for instance using the Jenkins CLI:

              java -jar jenkins-cli.jar -s http://localhost:8080 reload-configuration
  3. Click on "New Job".

  4. Enter a "Job name".

  5. Select "Copy existing job" and enter "php-template" into the "Copy from" field.

  6. Click "OK".

  7. Replace "localhost:8080" with the hostname and port of your Jenkins installation and replace the two occurrences of "job-name" with the name of your job in the "Description" text box.

  8. Disable the "Disable Build" option.

  9. Fill in your "Source Code Management" information.

  10. Configure a "Build Trigger", for instance "Poll SCM".

  11. Click "Save".

Following these instructions is equivalent to following the manual configuration steps from Chapter 3 and Chapter 4.