Continuous Integration Tools
Continuous Integration requires several tools to apply the concept properly. Of course, there are a variety of tools available. But first, let us begin with signs of a Continuous Integration:
For most teams, continuous integration in practice amounts to the following:
- use of a version control tool (CVS, SVN, Git, etc.)
- an automated build and product release process
- instrumentation of the build process to trigger unit and acceptance tests “every time any change is published to version control”
- in the event of even a single test failing, alerting the team of a “broken build” so that the team can reach a stable, releasable baseline again soonest
- optionally, the use of a tool such as a continuous integration server, which automates the process of integration, testing and reporting of test results
There are at least three tools required:
- Version Control
- Unit Test
- Continuous Integration server
A Version Control system is crucial to store the source code. Also called repository. It allows multiple developer to work on the same application. It also tracks changes between commit by developer. Popular Version Control system includes Subversion and Git.
Unit Test is important to keep the bugs at check. As part of Test Driven Development, Unit Test suite is crucial. There are plenty of Unit Test tools, available for almost every programming languages. For PHP, the most popular is PHPUnit by Sebastian Bergmann.
Continuous Integration server, while listed as optional is actually an important Continuous Integration tool. It automates testing and application build.
When someone changes the files that make up the software product and then attempts to check them in (in other words, attempts to integrate the changes into the main product code) you want to make sure that software can still be successfully built.
There is usually an external system, called the CI server, that either periodically or on every change, will grab the source files from version control, and attempt to build the product (compile/test/package). If the CI server can successfully do a build, the changes have been successfully integrated.
The CI server also has to be able to broadcast if the build failed or succeeded, so systems like Jenkins (one of the most used CI server today) will have ways to send emails/texts as well as a dashboard-like web interface with a bunch of information about current and past builds, who checked-in code, when things broke, etc… (On your image above, this would be the Feedback Mechanism)
CI is important, because it ensures that on a continuous basis, you have a working product. This is important for all the developers who are working on the software as well as for all the people who want to have access to daily releases of the product, like QA.
The first Continuous Integration server made was Cruise Control. Since then, a lot of Continuous Integration tools, especially Continuous Integration server have emerged.
Organizations wishing to experiment with alternate CI tools have plenty of options. Popular open source tools include Hudson, Jenkins (the fork of Hudson), CruiseControl and CruiseControl.NET. Commercial tools include ThoughtWorks’ Go, Urbancode’s Anthill Pro, Jetbrains’ Team City and Microsoft’s Team Foundation Server.
Most of the players in the CI market are pretty well established and the tools provide similar services. “They don’t greatly differ, even the open source ones,” says Kenefick. “The more expensive tools aren’t necessarily better than open source and low cost tools. You just need to look at them and understand what they can do.”
For PHP, there is PHP CI. A Continuous Integration tools based on PHP, for PHP.
Here is a list of Continuous Integration Tools from Wikipedia:
Software tools for continuous integration include:
- Apache Continuum: continuous integration server supporting Apache Maven and Apache Ant.
- Apache Gump: continuous integration tool.
- AutomatedQA Automated Build Studio: proprietary automated build, continuous integration and release management system
- Atlassian Software Systems Bamboo: proprietary continuous integration server.
- Buildbot: Python/Twisted-based continuous build system.
- BuildHive: free cloud-hosted continuous integration service for GitHub projects, based on Jenkins.
- CABIE (Continuous Automated Build and Integration Environment): open source, written in Perl
- Cascade: proprietary continuous integration tool.
- codeBeamer: proprietary collaboration software with built-in continuous integration features.
- CruiseControl: Java-based framework for a continuous build process and .NET-based automated continuous integration server.
- CruiseControl.rb: lightweight, Ruby-based continuous integration server that can build any codebase, not only Ruby; released under Apache Licence 2.0.
- Electric Cloud ElectricCommander: proprietary continuous integration and release management product.
- FinalBuilder Server: VSoft Technologies proprietary automated build and continuous integration server.
- Hudson: MIT-licensed, written in Java.
- Jenkins (Fork of Hudson): MIT-licensed, written in Java.
- IBM Rational Team Concert: proprietary software development collaboration platform with built-in build engine.
- IBM Rational Software SCLM: software configuration management system for z/OS.
- Microsoft Team Foundation Server: proprietary software development collaboration platform with continuous integration server and source code repository.
- Shippable: a Saas platform that provides Continuous Integration/Deployment to Github repositories.
- Strider: An open source continuous integration and deployment server written in node.js; BSD License
- TeamCity: a closed source, Java-based build management and continuous integration server from JetBrains
- Thoughtworks Go: open source (previously proprietary) agile build and release management software.
- Tinderbox: Mozilla-based product written in Perl.
- Travis CI: a distributed build system for the open source community.
- Xcode 5 also contains a proprietary continuous integration system, works closely with OS X Server for OS X Mavericks.
Remember, whatever tools we are using, we still have to follow Continuous Integration Best Practices. Because the Continuous Integration tools are useless unless we are using them properly.