/ development

Continuous Integration for PHP

Continuous integration for PHP projects is definitely a thorny subject, from my point of view. Why? Because the vast majority of continuous integration tools have a few drawbacks:

  • they are behemots: consider Jenkins CI and/or its parent Hudson. Designed in Java, for huge Java projects, they are resource hungry apps.
  • they were designed for Java: configuration built around ant which makes sense for Java, but in PHP it means you're using a high level tool to run command line scripts. The XML structure isn't helping, being rather complex even for simple scripts.
  • needsly slow & complex UI: in PHP the needs are simple - pull from remote, run tests/check code/mess detector, put results into code review - but the UI's are much more complex and sometimes force you into setting pointless defaults for stuff you don't want
  • slow: much of the above also translates into slow.

PHPCI tries to solve these problems with a very simple and focused application:

  • it's light: just a few kb of code that runs in a webserver you're likely to already have if you're a web developer. Yes, PHPCI is written in PHP and runs in NginX or Apache (Nginx recommended).
  • designed for PHP: has all the required plugins for PHP development and the configuration is simple YML (parser borrowed from Symfony2).
  • fast: minimal system requirements, very light and functional UI, even generates SSH keys to use in Bitbucket/Github or others.

Of course, it's not perfect:

  • lacks integration with some code review tools (like Gerrit)
  • though you can easily pull various tools via composer, it's still better to install them via pear
  • poor documentation (especially for configuration options)
  • to automatically start builds you need to manually create scripts and configure cron jobs (I like it but it hampers quick deployment).
Continuous Integration for PHP
Share this