Continuous delivery

Also known as: continuous deployment

On this page 7

Continuous delivery is a software engineering practice in which every code change is automatically built, tested and prepared for release, so that the main branch is always in a deployable state and a release to production becomes a routine, low-risk business decision. In DevOps, it extends continuous integration from merging and testing code to the full path toward production.

The practice is closely related to continuous deployment, and the two terms are often used interchangeably. Strictly, continuous delivery keeps a manual approval step before production, while continuous deployment releases every change that passes the pipeline without human intervention. In cloud environments, both rely on infrastructure as code, disposable environments and automated rollback.

How a continuous delivery pipeline works

The core mechanism is the deployment pipeline, an automated sequence of stages that each change must pass. A commit triggers the pipeline, which builds a single immutable artifact, such as a container image, and promotes that same artifact through progressively more realistic environments. Rebuilding per environment is avoided because it would invalidate earlier test results.

The table below shows the typical stages of a continuous delivery pipeline and the feedback each one provides.

StageActivitiesTypical duration
Commit stageCompile, unit tests, static analysis, build artifactUnder 10 minutes
Acceptance stageIntegration and end-to-end tests in a production-like environment10 to 60 minutes
Nonfunctional checksPerformance, security scanning, compliance rulesMinutes to hours
Staging or preproductionFinal verification, optional exploratory testingVaries by team
Production releaseApproved deployment with monitoring and rollbackMinutes
Typical stages of a deployment pipeline

A failing stage stops the line: the artifact is not promoted, and fixing the pipeline takes priority over new work. This discipline is what keeps the main branch releasable at any moment.

Continuous delivery sits between continuous integration and continuous deployment in a chain of increasing automation. The abbreviation CD is ambiguous and can refer to either delivery or deployment, so teams should define it explicitly.

PracticeWhat is automatedRelease to production
Continuous integrationMerging, building and testing each changeNot covered
Continuous deliveryEverything up to a deployable release candidateManual decision, automated execution
Continuous deploymentThe entire path including the releaseAutomatic for every passing change
Continuous integration, delivery and deployment

GitOps is a related operating model in which the desired state of the system lives in Git and an agent such as Argo CD reconciles the cluster to match it. GitOps is one way to implement the release step of continuous delivery, not a replacement for the pipeline itself.

Release strategies that support continuous delivery

Frequent releases are only safe when each release can be limited in blast radius and reversed quickly. Continuous delivery therefore relies on deployment strategies that separate deploying code from exposing features to users.

StrategyHow it worksBest suited for
Blue-green deploymentSwitch traffic between two identical environmentsInstant rollback with spare capacity
Canary deploymentSend a small share of traffic to the new version firstDetecting regressions on real users
Rolling deploymentReplace instances gradually in batchesStateless services on clusters
Feature flagsShip code dark and enable it at runtimeDecoupling release from deploy
Common release strategies

Database changes need particular care. The expand and contract pattern adds new schema elements first, migrates data, and removes old elements only after all application versions stop using them, which keeps deployments backward compatible.

Measuring continuous delivery performance

The DORA metrics are the most widely used way to assess delivery performance. Research behind them consistently finds that speed and stability improve together rather than trading off, because small batches are easier to test, review and roll back.

MetricDefinitionHigh-performing range
Deployment frequencyHow often code reaches productionOn demand, several times per day
Lead time for changesTime from commit to productionLess than one day
Change failure rateShare of deployments causing a failureRoughly 0 to 15 percent
Time to restore serviceTime to recover from a production failureLess than one hour
DORA metrics and what they indicate

Exact benchmark bands change between annual reports, so the values above are indicative ranges, not fixed standards. The trend within one team over time matters more than comparison with other organizations.

Prerequisites, limitations and common mistakes

Continuous delivery is a set of engineering and organizational capabilities, not a tool purchase. Pipelines built with GitHub Actions, GitLab CI/CD, Jenkins or Azure DevOps fail to deliver value when the underlying practices are missing.

  • Trunk-based development with short-lived branches; long-lived feature branches delay integration and break the flow.
  • Reliable automated tests; flaky tests erode trust until teams start ignoring red builds.
  • Production-like environments defined as code, so staging does not drift from production.
  • Observability and fast rollback, because no test suite catches every defect.
  • Regulated contexts may require documented approvals, which continuous delivery supports through an auditable pipeline rather than manual handovers.

A frequent mistake is to automate deployment while keeping large, infrequent releases. The pipeline then runs, but batch size and risk stay the same, and the expected gains in lead time and stability never materialize.

A plain-language summary

Continuous delivery means software is always ready to ship. Every small change goes through the same automatic checks. A machine builds it, tests it and prepares it for release.

Think of a bakery that checks every loaf as it leaves the oven. Bad loaves never reach the shelf. Good ones can go out whenever the manager says so. Because each batch is small, a problem is easy to spot and fix. The result is faster updates with fewer surprises for the people who use the software.

An example from practice

An online insurance company runs its quoting service on a managed Kubernetes cluster in the cloud. Before adopting continuous delivery, the team released once a month after a two-day manual test cycle, and about one release in four needed an emergency fix.

The team introduces a deployment pipeline that builds one container image per commit, runs about 1,800 automated tests in roughly 25 minutes, and deploys to a staging environment created from the same Terraform code as production. A product owner approves each release with one click, and a canary deployment sends 5 percent of traffic to the new version for 15 minutes before full rollout.

Within six months, the team deploys several times per week, lead time for changes falls from weeks to under two days, and the change failure rate drops to below 10 percent. When a defect does slip through, the canary metrics trigger an automatic rollback within minutes.