FANDOM


Welcome to the Continuous Integration for PHP Virtualbox Appliance (VM image) WikiEdit

This wiki is about a Virtualbox Virtual Appliance (VM image) with a pre-configured Continuous Integration software stack for PHP projects. Works out-of-the-box. Ready to code. Have fun.

PHP CI Image supports the Jenkins CI Template project of Sebastian Bergmann and extends the build automatisation (powered by Apache Ant) by introducing some advanced targets. CI is triggered by a VCS change and builds you application on a test environment incl. files, permissions, configuration, database setup, syntax check for php, javascript, css, compiling sass to css, minify javascript, unit tests, selenium tests, generting documentation with PHP Documentor or PHP Dox, verify against coding standards, code coverage analysis, metrics like cyclomatic complexity, npath complexity, lines of code, code rank, etc.

Continous Integration can be the locigal first step to:

  • Continous Packaging
  • Continous Delivery / Continous Release
  • Continous Deployment

PHP CI Image provides some ant targets to enable Continous Packaging and Automatic Packaging, which takes place if your build was build successful. This become accessable on a Early Access Program (EAP) channel. In addition Packaging takes place when you tag a VCS commit. These packages become available on a release channel. Your project packages are provided via Pirum. Pirum provides a PEAR channel and a composer repository.

Both, the PEAR channel and the repository makes it easy to install your project to a single server (webserver or application server) as to many servers, too. Packages are very usefull if you are running a project in a Load Balancing environment where a bunch of node needs to be updated or if your application should be installed by customers or a community.

Via PEAR installer you can perform that installation process localy (pull) or to an external system (push) as a system-wide install. If your LIVE environment is a shared host or if you want to have more then one version of your application on the same machine or if you simply do not like system-wide installations use composer.

This project introduces a deployment plan favors the repository-way to install your app to a non-public location on the server, where each release is deployed to a separate directory for the specific project version. To enable your new project release on a LIVE environment (production) you are required to change your symlink under /var/www/project to this new version dir. Quick and easy. This enables you to perform a quick rollback to the last stable version if you introduce a unstable release by a mistake (missing tests for a problematic situation - shit happens).

It is possible to enable a Continous Deployment based on the EAP channel / repository. Which satisfies your need of quick feedback and extends your feedback situation provided by Continous Integration. Quick feedback enables you to provide fixes quick. We belief that errors happen even if you work very acurate with your test suites - but if you notice that Continuous Integration is very helpful because you iterate in small steps which in turn makes easy to locate problems introduced shortly - you will notice that Continous Deployment is the logical extension of that concept. We recommand this way of improving your application instead of collection a brunch of features in each release - with appending bugfix sessions and bugfix releases.

PHP CI Image provides a pear channel to let you setup and distribute a state-of-the-art toolset easy to all of your developer desktops to make them productive in less time. Independent if they using Windows, Mac or Linux. Just call some commands on command line instead of doing so for a long list of PEAR channels and tool versions. Centralize your toolset definitions and reduce trouble.

PEAR channel to distribute your toolset. E.g.:

  • PHPUnit
  • PHPUnit DBUnit Extension
  • PHPUnit Selenium Extension
  • PHP CodeSniffer

This PEAR channel can be extended by you. E.g. to add your favorit Framework.

This project is started and maintained by Christian Weiss a Senior Web Developer and Head Of Software Development in mid-range company from germany. Christian can be hired for short and long term projects, to introduce a CI / CD, as a trainer for your PHP developer team or to extend your team.

You are welcome to contribute to this wiki. In case of technical questions stackoverflow.com is a good place to ask.

Tip:

You can convert this virtualbox VM image for useage in other hypervisor* software e.g. vmware, proxmox, etc..

  • =virtual machine plattform / virtual machine monitor

The stack: Edit

  • Debian
  • Jenkins CI
  • Apache Ant
  • git
  • MySQL
  • PHP
  • PHPUnit
  • PHP Depend
  • PHP Codesniffer
  • PHP Copy Paste Detector
  • PHP Lines Of Code
  • PHP Mess Detector
  • csslint
  • jslint
  • Selelnium Grid (Hub)
  • PHP Documentor
  • PHPdox
  • Pirum
  • Composer
  • PEAR installer
  • Apache
  • Nginx
  • PhpMyAdmin

The stack listing is without a version number. See release notes on what specific software version of each software in the stack is used in that PHP CI Image release.

Dependencies:

Some of the above applications / tools require a specific environment, so the following is installed too:

  • Oracle JDK
  • NodeJS / NPM

Latest activityEdit

Community content is available under CC-BY-SA unless otherwise noted.