Continuous deployment
Continuous deployment is the practice in which every change that passes the automated pipeline is deployed to production with no manual approval or release step in between. It goes one step beyond continuous delivery, which keeps every change ready to ship and leaves the decision to ship with a person. Here the pipeline's result is the decision.
The longer version
Martin Fowler's article on continuous delivery draws the line in two sentences. "Continuous Deployment means that every change goes through the pipeline and automatically gets put into production, resulting in many production deployments every day." Continuous delivery, in the same article, means a team is able to deploy that frequently and may choose not to. He adds the dependency between them: "In order to do Continuous Deployment you must be doing Continuous Delivery." The pipeline is the same in both, and the last step is what changes. Under continuous delivery a verified build waits for someone to release it. Under continuous deployment nothing waits, and a merge to the main branch is the last human act before the change is live.
Removing the person removes the last place where doubt could stop a change, so everything that person would have checked has to be checked by the pipeline. The automated tests must be trusted enough that a green run is accepted as permission, and a flaky or thin suite rules the practice out. Changes have to be small, so that a failure points at one commit. Unfinished work has to be able to sit in production unseen, which is the job of a feature flag. Database changes have to keep the previous version of the code working, because old and new code overlap during a deployment. And production has to be watched by monitoring that can halt a rollout or reverse it, since no meeting was held at which anyone could have said stop.
Continuous deployment moves testing work and does not delete it. There is no release candidate and no regression window before the release, so checks a person used to make at the end are made earlier, on the pull request or its preview environment, or later, on production behind a flag or in a canary stage. Some products cannot adopt the practice as defined. An app sold through a store that reviews each update before publishing it, as Apple's App Store does, reaches users only after that review, and software that customers install is deployed by the customers. A change that needs a recorded approval keeps a manual step by design, and a pipeline with a manual approval before production is continuous delivery under the definition above.
The practice is older than most of its tooling. Octopus credits Timothy Fitz with probably the first definition, a release process built on the fail-fast pattern that he summed up as releasing undeployed code as fast as possible instead of waiting for a weekly release to break. Wikipedia lists Meta, Microsoft, Atlassian, IBM, Adobe and Tesla among its adopters. It rests on continuous integration, which Atlassian describes as part of both continuous delivery and continuous deployment: developers merge to the main branch at least once a day and every merge is built and tested. The rollout itself usually follows a strategy that limits how many users meet a bad change at once. IBM names blue-green deployment, two identical environments running different versions so traffic can be switched back, and rolling and canary deployments, which replace instances or expose users in stages. Atlassian's summary of the human effect is that there is no release day any more, and it warns that documentation, support and marketing have to keep up with the pace of deployments.
Common questions
What is continuous deployment?
Continuous deployment is a way of shipping software in which each change that passes the automated build and test pipeline goes to production automatically. Nobody schedules a release or presses a button. The checks in the pipeline are the only gate, so the quality of those checks decides the quality of what users receive.
How does continuous deployment differ from continuous delivery?
Continuous delivery ends with a verified build that a person chooses to release, at whatever moment suits the business. Continuous deployment removes that choice and sends every passing change to production. Martin Fowler notes that the second requires the first: a team must already be doing continuous delivery before it can deploy continuously.
What does a team need before adopting continuous deployment?
A team needs automated tests it trusts enough to release on without a second look, small changes that can be traced one at a time, feature flags to keep unfinished work hidden, database changes that tolerate the old and new code running together, and production monitoring wired to a quick reversal. Without those, the missing human check has no replacement.
Is continuous deployment safe?
Safety under continuous deployment comes from the size of each change and the speed of recovery. A deployment that carries one small change has little to go wrong and an obvious suspect when something does. The practice becomes unsafe when the test suite is not trusted, when changes are large, or when a failing deployment would go unnoticed for hours.
Where does manual testing fit in continuous deployment?
Manual testing moves to either side of the deployment. Before the merge, a tester or reviewer works on the pull request's preview build. After it, exploratory testing runs in production on features still hidden behind a flag, and feedback from the first users of a staged feature is read before the flag opens wider. No manual pass sits between merge and production.
What is the difference between CI and CD?
Continuous integration (CI) is the habit of merging code to the main branch often, at least daily, with an automated build and test run on every merge. CD stands for either continuous delivery, where each passing build is ready to release on a person's decision, or continuous deployment, where it goes to production automatically. CI is the foundation both forms of CD stand on.
Who coined continuous deployment?
Octopus credits Timothy Fitz with probably the first definition of continuous deployment as a practice, describing it as a software release process that applies the fail-fast pattern. The idea was to release code as soon as it is written and tested, instead of letting it wait for a weekly release.
What deployment strategies are used with continuous deployment?
Three are common. Blue-green deployment runs the new version beside the old one in an identical environment and switches traffic over, which keeps the old one ready for a switch back. A rolling deployment replaces instances a few at a time. A canary deployment sends a small share of users to the new version first and widens it while the metrics stay healthy.
Bug reports that arrive ready to triage.
Collect replay, console, network and browser context with the Free plan.