What is continuous delivery?

In short
Continuous delivery is a way of building software so it can be released to production at any time. Teams automate building, testing and deploying, and keep the code deployable throughout its life. It is not the same as deploying every change automatically, which is called continuous deployment.
How it works
Continuous delivery is a way of building software so that it can go live at any time. The goal is not to release every hour. The goal is that a release is always possible, and the code is always in a state where it could be shipped safely.
To get there, a team repeats a few steps. Every change is merged into a shared codebase. The code is built into an executable package. Automated tests run against that package to catch problems early. The package is then moved through a series of environments that look more and more like production. A test environment comes first, then a staging area that mirrors the live setup as closely as possible.
The chain of steps that moves a change through these stages is called a deployment pipeline. Each stage either passes and hands the change to the next one, or fails and stops it. A developer can see quickly whether a change is fit to ship.
What a team needs in place
Martin Fowler's reference describes a few signs that a team is doing continuous delivery. The software can be deployed at any point in its life, not only at the end of a project. The team treats keeping the software deployable as more important than starting new features. Anyone who changes the system gets fast, automated feedback on whether it is ready for production. The team can also deploy any version of the software to any environment on demand, with a push-button action.
A useful test is this: a business sponsor asks for the current development version to go live at short notice, and nobody panics. The release is routine.
Two foundations make this possible. The first is a close working relationship between everyone involved in delivery. The source calls this a DevOps culture, and it stresses that the idea should not stop at developers and operations. Testers, database teams and anyone else needed to get software into production belong in the group too. The second foundation is automation. Building, testing and deploying should be automated wherever possible, usually through a deployment pipeline.
Delivery is not the same as deployment
People often mix up continuous delivery with continuous deployment. The two are close, but they are not the same.
Continuous deployment means every change that passes the pipeline goes straight into production automatically. That can mean many production deployments each day.
Continuous delivery means you are able to deploy frequently, but you may choose not to. Many businesses prefer a slower pace of release for their own reasons. The key point is that the choice belongs to the business, not to the technology. You must be doing continuous delivery before you can do continuous deployment.
Continuous integration is the base layer. It covers integrating, building and testing code inside the development environment. Continuous delivery builds on it and handles the final steps needed to get code into production. If you are new to the first half, read our page on continuous integration.
Why teams bother
The source lists three main benefits.
Reduced deployment risk. Smaller changes mean less can go wrong, and when something does break, it is easier to find and fix.
Believable progress. Many teams measure progress by counting finished work. If done only means a developer says it is done, the count is not very reliable. Work that is running in production, or in a production-like environment, is much harder to dispute.
User feedback. A common danger in software projects is building something nobody needs. The sooner working software reaches real users, the sooner you learn whether it is valuable. Getting that feedback regularly depends on frequent releases.
You do not have to send new software to every user at once. Teams often release to a small group first. Feature flags are one way to control who sees a change. Our page on feature flags explains the idea.
A simple example
Picture a retailer replacing its online shop. The team does not switch everyone over on the same day. The new system goes first to the company's own employees, who can report problems quickly. Next it goes to a small group of invited premium customers. Only when the results look good does it reach all customers.
Each step is a normal release through the same pipeline, not a special event. The team does not need a heroic weekend to make it work. Making releases this ordinary is the whole point of the practice.
Common mistakes
Treating the pipeline as a finished project. A pipeline needs ongoing care. When tests get slow or unreliable, fix them rather than skipping them.
Keeping manual gates everywhere. Some approvals may be needed, but every manual step slows the release and adds room for error.
Letting the database lag behind. Schema changes should travel through the pipeline with the code. If only the application is automated, releases will still stall.
Skipping production-like environments. A test setup that differs a lot from production can pass changes that then fail live.
Waiting for a perfect moment. Frequent small releases are easier to manage than rare large ones. Teams that wait for a quiet period often end up with risky batches.
FAQ
Does continuous delivery mean releasing every change to users?
No. It means every change could be released safely at any time. The business can still choose when to release. Continuous deployment is the option that pushes every change to production automatically.
What is the difference between continuous delivery and continuous integration?
Continuous integration covers merging, building and testing code in the development environment. Continuous delivery takes that work further and handles the final steps needed to put code into production.
Do I need a deployment pipeline to practise continuous delivery?
In practice, yes. The source says teams usually use a deployment pipeline to automate the delivery process. Without automation, frequent and safe releases are very hard to sustain.
Can a small team start with continuous delivery?
Yes. A small team can begin by automating its build and tests, then add deployment steps over time. The key habit is keeping the software deployable at all times.
Sources
This page is based on the official documentation below. Read it for full detail.
Continuous delivery — official documentation ↗