Continuous integration (CI) involves producing a clean build of the system several times per day, usually with a tool like Jenkins, which uses ANT/Maven and various source-control systems such as SVN. Agile teams typically configure CI to include automated compilation, unit test execution, and source control integration.
Sometimes CI also includes automatically running automated acceptance tests such as those developed using Fitnesse. It reduces risk and establishes fast and sustainable development.
Feature- and component-level continuous integration
An Agile team creates value only when the team members frequently integrate and test the results of their combined work. When integration happens frequently, it ensures that the different roles and functions on the team are actually able to produce a consistent output: the team's work for the increment.
Best practices call for members of an Agile team to integrate their work at least once per iteration, with preference toward an even more frequent cycle time. This continuous integration effort should be part of the team's velocity calculation, otherwise the team will fail to establish a sustainable pace.
Benefits of continuous integration
When CI works well, it helps the code stay robust enough that the customer/client and stakeholders can play with it whenever they like. It also encourages more feedback between programmers and the customer.
Like refactoring, continuous integration works well if you have an exhaustive suit of automated unit tests that ensure that you aren't promoting buggy code. One popular continuous integration rule states that programmers should never leave anything unintegrated at the end of the day, and the build should never spend the night in a broken state.
Suggestions for implementing continuous integration successfully
The more frequently teams integrate, the more quickly they find problems. They should do it often, eliminating impediments and adding automation along the way. This will result in faster learning cycles and less rework.
Make integration results visible
When the integration process breaks, everybody should know why it broke. And when it fixed, then they should know what fixed it, too.
Fixing a failed integration is a top priority
Attention should be directed immediately toward fixing the problem before adding new functionality. This way we can accelerate learning and decrease the impact of the underlying issue.
6 top continuous integration tools
- Jenkins: Jenkins was originally created as a Hudson project at Sun Microsystems. It is developed in Java.
- Buildbot: It is developed in Python.
- Travis CI: Travis CI is probably one of the easiest CI servers to get started with. Travis CI is open source and thus free to host on your own server.
- Go: Go was created and then open sourced by ThoughtWorks. As with other advanced CI servers, Go lets you distribute your builds across different systems and monitor them all in one place.
- Integrity: This was built on Ruby.