Monday, June 20, 2011

Something on Continuous Integration

In the past I have been experiencing some weird practices concerning CI. In the following article I will outline some do's and don'ts when implementing continuous integration.

First and foremost it is ok to break a build that is why the thing is there you know. Comparing the number of broken builds against the ones that don't break is not a good measure of quality instead measure the time to fix the build.

Do Integrate static code analysis in your build like FxCop, Ndepend and Simian. Giving you early feedback on your code quality. If the tools give you warnings solve them as well. If you keep up on regular basis this will keep your code base clean.

Do Integrate your Unit tests to run every build. Again providing early feedback on integration issues.

Do provide visual feedback (Andon) that give people an immediate feedback when a build fails.

Don't force developers to do a get latest, run all their unit tests and then check in. This is a waste of time. But when a build fails fix it!

Don't seek who broke the build. Something that is very common is that people are very eager to investigate who broke the build and pointing fingers. Instead look what broke the build try to fix it, this will enhance collective code ownership.

Don't check in, close your laptop and sprint out of the office. This practice kills team morale.