Skip to content

On Continuous Delivery

Historical post — views and technology at time of publication.

Continuous delivery is a software development practice in which teams work so that the company can update its systems at any time, or continuously, through automated processes. The codebase is always tested and deployable.

Why is it important?

Continuous delivery is a more efficient way to build software as it enables a team to get constant feedback on the application's changes and updates, allowing you to detect problems early and consequently improve quality, reduce costs and deployment frictions. This constant feedback also gives the team a realistic view of development progress instead of relying on perceptions.

Continuous Delivery gives a company the ability to react quickly and respond to change. A fluid development process lets you change your strategy more easily and rapidly. This is especially critical for early-stage startups where rapid iteration is key to finding product-market fit, but it's equally valuable for established institutions looking to modernize their development processes.

It allows a company to increase its capacity and scale more easily. A continuous process facilitates working with bigger development teams. Batch processes like iteration planning, release planning, and release testing become exponentially harder to organize as you involve an increasing number of people. Continuous delivery solves this problem by skipping batch processes.

Basic Principles

  • Visibility – All aspects of the delivery system including building, deploying, testing, and releasing are visible to every member of the team to promote collaboration.
  • Feedback – Team members learn about problems as soon as they occur, so they can fix them quickly.
  • Continually Deploy – Through a fully automated process, you can deploy and release any version of the software to any environment.

Automation is the Foundation of Continuous Delivery

To achieve continuous delivery you need a highly automated delivery process. After a developer commits, everything should be completely automated, including reports, metrics, release notes, etc.

Continuous Integration

In order to deliver continuously you also need to do Continuous Integration. That means developers have to continuously integrate their code, at least once a day. Successful integration is determined by an integration server that builds the system and runs the test suite every time new code is added. If tests fail, the team gets a notification, which allows it to fix the problem as soon as it appears.

Integration Strategies

Which integration model fits depends on your version control strategy. Andy Singleton's book Unblock has a useful four-pattern categorization (opens in new tab) worth reading. In short:

Centralized

The traditional pattern, popularized by Jez Humble. All changes go into one central version and automated tests run on it continuously, so problems surface as early as possible. It is easy to set up and scales to complex build and test systems.

Distributed

Common at SaaS companies that release every change. Each change is tested in its own branch and released on its own.

Review branch

Each change is tested and reviewed before it goes into the shared version. It lets bigger teams produce more reliable code, and it's a best practice.

MAXOS

For systems made of many communicating services. Each team releases its own service, often with review branches, and a central integration system checks it against the pre-release versions of the other services before it reaches production.

Team Commitment and Development Workflow

Continuous integration is not only about automated testing; it is an organizational process. To successfully integrate code continuously a development team must commit to follow best practices of continuous integration and take more responsibility for delivering release-ready code and features.

  • Master branch should always be deployable.
  • Keep it fast: measure automatically and continuously improve it.
  • Use feature toggles (aka feature switches) to turn new features on and off.
  • Over Communicate: communication plays a primary role in continuous integration.
  • Check in frequently.
  • Don't check in broken code.
  • Don't check in untested code.
  • Always verify the system builds after check in.

Related writing