tezvyn:

Continuous Delivery vs. Deployment: The Final Step

AI-drafted, machine-checkedSource: redhat.comadvanced

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.

Read the original → redhat.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.