Skip to content
tezvyn:

Continuous Delivery vs. Deployment: The Final Step

Source: redhat.comHardHow cards are made

Continuous Delivery automates releases to a staging environment for a manual go-live decision, while Continuous Deployment automatically pushes every passing build to production. Use Delivery for business-timed releases; use Deployment for maximum velocity.

The mental model

Both Continuous Delivery and Continuous Deployment automate your release process, but they differ in the final step. Think of it as a pipeline with a valve at the end. With Continuous Delivery, a human has to manually open the valve to release code to users. With Continuous Deployment, any code that passes all the automated checks automatically opens the valve and goes live.

How it works

The process starts after Continuous Integration (CI), where code is built and unit/integration tests are run. In both CD models, a passing build is automatically deployed to a staging-like environment. This is where they diverge. For Continuous Delivery, the pipeline pauses, waiting for a human to give explicit approval (like clicking a button) to deploy to production. For Continuous Deployment, if the automated tests in the staging environment pass, the pipeline proceeds automatically to deploy that same build to production without any human intervention.

When to use it

Use Continuous Delivery when you need to decouple the technical deployment from the business release. This is common in environments with strict regulatory requirements, complex marketing campaigns, or when product managers want final say on the timing of a feature launch. Use Continuous Deployment when your team has an extremely high level of trust in its automated test suite and the primary goal is to minimize the lead time for changes. Every merged commit that passes the pipeline goes to production, enabling rapid iteration and feedback.

When not to use it

Do not attempt Continuous Deployment if your automated testing is not comprehensive and reliable; you will automate the deployment of bugs directly to your users. Neither practice is effective without a solid Continuous Integration foundation. If your builds are flaky or your initial test suite is weak, fix that first.

One canonical example

A team practicing Continuous Delivery finishes a new feature. The code is merged, and the CI/CD pipeline automatically builds, tests, and deploys it to a staging server. The product manager reviews the feature on staging and, once satisfied, clicks a "Promote to Production" button. In a Continuous Deployment scenario, a developer merges a one-line bug fix. The pipeline runs, and ten minutes later, the fix is live in production, having passed all automated gates without anyone touching a deploy button.

Interview question

A software team needs to ensure new features are released to production only after a product manager's explicit approval, often coinciding with marketing initiatives. Which practice best fits this requirement?

  • a.Continuous Integration, as it ensures code quality before any deployment.
  • b.Continuous Delivery, as it allows for a manual gate before the final production release.Correct
  • c.Automated Testing, as it validates the software before any human intervention.
  • d.Continuous Deployment, because it ensures the fastest possible delivery to users.
Why?

Continuous Delivery is designed for scenarios where a manual gate is required before releasing to production, allowing for business-timed releases or product manager approval. Continuous Deployment, while fast, automates the final release without such a manual gate, making it unsuitable for this specific requirement.

Just read this? Test yourself on what you have been reading.

Read the original → redhat.com

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on devops — each one lists the topics its interview covers.

See open roles