Continuous Integration

What is Continuous Integration (CI)?

Continuous Integration is a set of standards and a software (or a collection of software tools) that allow developers to push releases out to production with minimal errors. Occasionally business environments and specifically in startup business environments, changes need to be applied on the fly. Often these changes are released untested or without proper regression testing. More often than not, we have realised that such changes have the potential to break applications elsewhere. Worse still, these errors go unnoticed for a good period of time and can lead to financial and business loss. CI is a philosophy supported by a bunch of tools to reduce the probability of such situations.

Test Driven Development

Continuous Integration couples strongly with Test Driven Development (TDD). TDD is a software development process in which the application author starts by writing test cases set initially to fail the acceptance criteria. The application author then needs to refactor the code to make the application pass all the tests. Continuous Integration tools can run these tests any number of times at any given point of time. Any changes to an existing component must pass all previous test cases to signify a ready to deploy product.

Jenkins

Jenkins is an open source Java based Continuous Integration tool used to deploy software products and manage release processes. Even though it has it's roots in Java, the software can be used to deploy and manage software products built in any programming language. Jenkins has plugins for managing repositories (Subversion / GIT) and has tools to run code sniffer (check coding standard violations / missing documentation), automated documentation, lint error checks etc. Software products built using TDD can run the automated tests any number of times using Jenkins.

Jenkins tools for PHP applications

  • Subversion Plugin
  • PHP Lint
  • Codesniffer
  • PHP Depend
  • PHP Doc