Sunday, May 15, 2011

Build Optimization for effective CI

In this post I would like to bring some of my observation and perspective of Build Optimization to have a very effective and good Continuous Integration System.

Build Script is all about automating the tasks required for the system development.
I have noticed that Build Scripts are not given enough priority in teams as compared to production code. In fact on a lighter note, it is seen that in the context of priority the order of priority is on these lines , production code first, test code second and build script may be last. "-:)
Some of the most commonly used build script language is Ant, Maven, Make.

The way the build is organized should depend on the following factors:
a) Module Organization
b) Where (Which Operating System ) and how it should compile, test
c) Packaging Structure

Before the build script is written the member should understand the way the system is organized, how the modules are dependent to each other. This would help in really organizing the system appropriately.

Due care should be taken to ensure that there are no unnecessary steps added without any purpose. Sometimes I have seen that some build scripts perform tasks like zipping and sending the files to some other server, unzipping & compile and bring back the file to the root server and then do certain operations. When it is closely looked it was found that these operations were really not required. These tasks add to the time taken for the building the system. This is also one of the reason why Continuous Integration System in some teams takes more time to provide the overall results.

The important point is the Build Scripts should be reviewed carefully and members writing the scripts should be well trained on the system. If it is given less attention, later it effects the complete team's performance as time taken for completing the whole build through Continuous Integration System (includes compilte, inspection , test ) is very high. And later refactoring the build scripts is a mammoth task.


No comments:

Architecting for Continuous Delivery

This short article will provide details about the various architecture specific requirements for good implementation of continuous delivery...