July 2, 2011
Continuous Integration and Build Automation

Without a strong continuous integration process, a well organized Agile/Scrum project can quickly turn to chaos. Agile is most commonly associated with iterative development, which in turn, implies continuous visibility of a project (Scrum Masters, Product Owners and Stakeholders are always interested in the state of a project) and continuous integration via build automation supply the the foundation for supporting the demanding pace of an Agile/Scrum project.

When I’m developing code on a team, its nice to know that at the very least, the code compiles, unit tests/specifications are passing, the code is well covered and that when I check it in, everyone in the organization who is interested in the state of a project can easily get access to it.

Currently, I am using a set of crafty NAnt scripts along with Team City to ensure the visibility of our project and its associated artifacts.

The NAnt build scripts include features which can compile, execute automated tests/specifications and generate reports, generate code coverage reports, generate code analysis reports, version, create environment specific versions (DEV, QA, PROD, etc), zip the output and back it up to network drive, deploy the the target applications (in my case, web applications) to an integration server for immediate availability as well as an assortment of other things.

Team City listens for check-ins to occur on my source control repository and when it detects one, it grabs the latest version of code and executes the associated NAnt build script. All of the reports generated by the build are visible through the Team City web site interface as well as access to the final build output along with some custom reports that I generate to make it easy to track all of the applications which were affected during the build (paths to generated output, version numbers which were deployed to integration server, etc).

All in all, the combination of a Source Control Repository, NAnt and Team City provide a simple continuous integration solution with valuable information about the latest version of an emerging project.

Did I mention that Team City Professional is FREE for up to 20 Build Configurations and 20 Users! NAnt is an open source .NET port of the popular Ant tool from the Java world and while I know that there are some more modern (non XML) alternatives (Albacore, psake) I decided to stick something I knew for the current project, however in my free time, I’ve been looking at UppercuT, Powershell and Ruby as a .NET build tool.

  1. kasiprasad posted this