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.
| Stage | Activities | Typical duration |
|---|---|---|
| Commit stage | Compile, unit tests, static analysis, build artifact | Under 10 minutes |
| Acceptance stage | Integration and end-to-end tests in a production-like environment | 10 to 60 minutes |
| Nonfunctional checks | Performance, security scanning, compliance rules | Minutes to hours |
| Staging or preproduction | Final verification, optional exploratory testing | Varies by team |
| Production release | Approved deployment with monitoring and rollback | Minutes |
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 compared with related practices
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.
| Practice | What is automated | Release to production |
|---|---|---|
| Continuous integration | Merging, building and testing each change | Not covered |
| Continuous delivery | Everything up to a deployable release candidate | Manual decision, automated execution |
| Continuous deployment | The entire path including the release | Automatic for every passing change |
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.
| Strategy | How it works | Best suited for |
|---|---|---|
| Blue-green deployment | Switch traffic between two identical environments | Instant rollback with spare capacity |
| Canary deployment | Send a small share of traffic to the new version first | Detecting regressions on real users |
| Rolling deployment | Replace instances gradually in batches | Stateless services on clusters |
| Feature flags | Ship code dark and enable it at runtime | Decoupling release from deploy |
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.
| Metric | Definition | High-performing range |
|---|---|---|
| Deployment frequency | How often code reaches production | On demand, several times per day |
| Lead time for changes | Time from commit to production | Less than one day |
| Change failure rate | Share of deployments causing a failure | Roughly 0 to 15 percent |
| Time to restore service | Time to recover from a production failure | Less than one hour |
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.