What is ContinuousIntegration?#

An important part of any software development process is getting reliable builds of the software. Despite it's importance, this often isn't done. A good practice is a fully automated and reproducible build, including testing, that runs on a regular schedule. This allows each developer to integrate code revisions on an ongoing basis, thus reducing integration problems.

There are several parts to making an automated build work:

  • Keep a single place where all the source code lives and where anyone can obtain the current sources from (and previous versions)
  • Automate the build process so that anyone can use a single command to build the system from the sources
  • Automate the testing so that you can run a good suite of tests on the system at any time with a single command
  • Make sure anyone can get a current executable which you are confident is the best executable so far.

Refer to the whitepaper http://www.martinfowler.com/articles/continuousIntegration.html by Martin Fowler and Matthew Foemmel.

There are several open source tools available to support ContinuousIntegration.

AntHill

Anthill is a tool that ensures a controlled build process and promotes the sharing of knowledge within an organization. Anthill performs a checkout from the source repository of the latest version of a project before every build and tags the repository with a unique build number after every build. Anthill also automatically updates a project intranet site with artifacts from the latest build. Anthill is an extension to the Apache-Ant project and is compatible with version 1.3, 1.4 and 1.5 of Ant.

Anthill can be used with CVS, PVCS, Perforce, VSS, MKS Integrity, and Starbase StarTeam. There is also a File System Repository that allows you to use Anthill without a specified source repository.

See http://www.urbancode.com/projects/anthill/default.jsp.

CruiseControl

CruiseControl is a framework for ContinuousIntegration. It includes, but is not limited to, plugins for email notification, Ant, and various source control tools. A web interface is provided to view the details of the current and previous builds.

See http://cruisecontrol.sourceforge.net/index.html.

--PaulDownes, 11/21/02

I agree with the importance of this. We had some rather arrogant/careless programmers here last year, and they were sloppy about syncing and doing full rebuilds before checking in changes (and anyone can forget to add new files to source control). But this was driving other people (particularly our JSP/servlet guy, who needed to have all underlying code in order to run his stuff) crazy. He would lose whole afternoons because the build was broken and the person who broke it was in meetings or otherwise unavailable.

Being unaware of these tools at the time, I wrote something called Elijah (not Free, sadly) that does much the same thing as these tools, checking Perforce every 45 seconds for new files, recompiling code and JSPs, sending out emails if it failed (or when it stopped failing) and updating a web page that could tell you if it was safe to sync or not.

Sadly we don't have testing fully integrated in (our QA staff is one person, and she's not prone to automating things). But i have been scratching my chin on how our Unit tests could get run automatically.

I now consider this service to be an essential part of any development environment.

-- MahlenMorris

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-6) was last changed on 15-Jan-2003 16:43 by 208.57.166.28