Reduce Build Fragility

When teams experience frequent build breakages, it is often the result of fragile builds. For example, specific, changing parameters must be set at build time; or a minor change in an XML file has repercussions that are difficult to predict; or there is a large number of resources pulled into the build from hard-coded paths outside the workspace.

Fragile builds are usually the result of complex and difficult-to-configure build environments, where small changes to the project's configuration can have unpredictable effects. Identifying where the build is fragile and improving it can go a long way towards preventing breakages. The time spent reducing build fragility will be offset by the future reduction of broken builds, as well as the ease by which developers can reproduce the build environment on their local machines. In the long run, the less fragile the build, the more time developers (and the other teams relying on successful builds) can devote to productive activities.

A robust build, is a portable build. If your build can only run a single build machine rather than select from many similar machines in the build farm, it's probably fragile. What would it take to make the build portable?

Some Steps away from Fragility

  • Use a build script rather than building from the IDE
  • Store the build script within your project in source control
  • Ensure "interface" consistency across your organization's build scripts. Anyone familiar with any project, should be able to guess where another team's build script is, and what target(s) to call within it.
  • Remove interaction with source code from core build script
  • Avoid reliance on mapped network drives
  • Include the contents of "magic" directories that the build requires, but are not in source control, either in source control with the project, or in a dependency management system like AnthillPro's Codestation, Maven or Ivy.
    Next Steps

© 2010 Urbancode, Inc.
Anthill, AnthillPro, and AnthillOS are trademarks of Urbancode, Inc.
All other trademarks are owned by their respective owners.
tel: (216) 858-9000 fax: (216) 393-0006 email:info@urbancode.com