The benefits of continuous builds are so obvious, widely documented and experienced nowadays that anyone with even a passing interest in agile process improvement, a continuous integration server will be one of the first things they set up in their teams.
However, these same teams are often not using the investment in setting up and running continuous integration to it’s full potential.
Here’s a few mistakes and anti patterns that I have come across and read about:
If you do not have enough automated tests in your code base, your continuous integration server is reduced to a fancy shared compiler.
The aim of continuous integration is not only to check that your code continuously compiles, but also to check that the integrated code base continuously holds a certain degree of quality as changes are committed by various developers and those changes interact and intersect.
The only way to practically achieve this is by judiciously implementing lots of unit tests, integration tests, and if possible, automated acceptance tests which can be ran against each build.
Many teams do a daily or twice daily build. In my experience, this can reduce the value of the continuous integration process as feedback on your check-ins can be too infrequent, and people tend to batch check-ins right before the build.
Ideally, we want people integrating with the shared build early and often, bringing forward as far as possible feedback from the integration process.
This drastically improves the potential for people to be working on the same areas of the code base without treading on each others toes.
Related to the above is the fact that if developers are not committing to the code base frequently (perhaps due to practices such as feature branching) then code is not pushed into the integration server and is not being tested early enough.
If developers are working on complex features, they may find that their code is off of the integrated path that is being tested for days or even weeks at a time, increasing the chance of problems when it comes to merge or test the code later to the release.
No Continuous Deployment
If you have gone to the trouble of setting up a continuous integration server, but do not have a continuous deployment into some environment, your CI server is then effectively just reduced to a fancy shared compiler and test runner.
By frequently deploying the output of your continuous integration process into some environment, you’ll start to realise the benefits in terms of giving your users working software, and bringing forward the stage where you can begin to run acceptance tests and manual tests against the product.