How to Implement Continuous Integration

[article]

very specific pieces of code, makes the change, builds and unit tests, then checks the code into the integration stream. Upon check-in, an integration build immediate occurs that includes testing. If this build and test are successful, the other developers are notified of these changes and they may then synchronize their workspace with these changes.

Cultural Shift
In order to apply continuous integration, an agile-related methodology must be considered and changes to your development processes must be made to support this approach. Given the adversity to change in most organizations, this is not small task. It represents a significant shift in the development and build process, but focuses on small and steady progress. Integration should happen frequently (possibly more than once a day), but this will vary from project to project depending on the nature of the work. It is better to start with a new and small project that is appropriate for use with agile methodologies. This way, there is no existing culture and methodology to overcome and training can be applied that teaches the developers the new approach.

With this in mind, there needs to be an intelligent and conscious effort to select a development methodology that supports small increment or iterative development. Broadly, Agile ideas are best suited for applying continuous integration. Inversely, continuous integration is a key element of many Agile related methodologies. An example of such a methodology is extreme programming (XP). XP defines practice areas that include (but are not limited to) planning for small releases, focusing on only the changes that are necessary, making the change requests small and manageable, building and testing continuously, working in small groups particularly in pairs of developers, and building several times a day so all developers have the same baseline of code.

The next step is to take the methodology selected and establish a development process. An example may be the project manager plans very discrete chunks of work (or change requests) that can be completed within a short period of time as prescribed by the development methodology. This methodology works best when the development tasks are assigned to specific developers targeting specific and non-overlapping functionality to reduce or avoid significant merging activities. When the developer receives a change request, he checks out the very specific pieces of code, makes the change, builds and unit tests, then checks the code into the integration stream. Upon check-in, an integration build immediate occurs that includes testing. If this build and test are successful, the other developers are notified of these changes and they may synchronize their workspace with these changes.

Infrastructure
What needs to be in place to integrate continuously? First, we need a fast and centralized server to integrate, build, and test the code quickly. Second, a solid configuration management (CM) technology is needed. Third, we need a continuous integration technology that supports automated builds and testing. In addition, while having successful builds is important, the automated testing piece is critical so that the changes pass specific test criteria before it is make publicly available. Once these are in place, you can create a continuous integration environment.

·       Fast and centralized server: Since continuous integration implies frequent building, it is important to have a fairly fast and powerful server to handle the constant builds. The central server approach is needed so that the continuous integration technology can monitor the CM repository (both technologies needing to reside on the same server) so that they can work effectively together.

·       CM technology:  It is important to have a quality CM technology in place. In relation to continuous

About the author

Mario  Moreira's picture Mario Moreira

Mario Moreira is a Columnist for the CM Journal, a writer for the Agile Journal, an Author, an Agile and CM expert for CA, and has worked in the CM field since 1986 and in the Agile field since 1998. He has experience with numerous CM technologies and processes and has implemented CM on over 150 applications/products, which include establishing global SCM infrastructures. He is a certified ScrumMaster in the Agile arena having implemented Scrum and XP practices. He holds an MA in Mass Communication with an emphasis on communication technologies. Mario also brings years of Project Management, Software Quality Assurance, Requirement Management, facilitation, and team building skills and experience. Mario is the author of a new book entitled “Adapting Configuration Management for Agile Teams” (via Wiley Publishing). It provides an Agile Primer and a CM Primer, and how to adapt CM practices for Agile Teams. Mario is also the author of the CM book entitled, “Software Configuration Management Implementation Roadmap.” It includes step-by-step guidance for implementing SCM at the organization, application, and project level with numerous examples. Also consider visiting Mario’s blog on CM for Agile and Agile adoption at http://cmforagile.blogspot.com/.
 

AgileConnection is one of the growing communities of the TechWell network.

Featuring fresh, insightful stories, TechWell.com is the place to go for what is happening in software development and delivery.  Join the conversation now!

Upcoming Events

May 04
May 04
May 04
Jun 01