CI/CD Lesson 5 – Continuous Delivery | Dataplexa
Section I · Lesson 5

Continuous Delivery

In this lesson

CD Definition Always Deployable The Delivery Pipeline Approval Gates CD vs Continuous Deployment

Continuous Delivery (CD) is the practice of keeping software in a state where it can be released to production at any moment — not just in theory, but in fact. Every change that passes CI is automatically built into a versioned artifact, deployed to a staging environment, and validated with end-to-end tests. A human then makes the final decision to release to production, but that decision requires no technical preparation. The code is already there, already tested, already packaged. Releasing becomes a business decision, not an engineering event.

CD sits directly on top of CI. Where Lesson 4 explained how code is continuously verified, this lesson explains how that verified code is continuously prepared for release. The distinction between Continuous Delivery and Continuous Deployment — which is often confused — is also covered in full here, because it is one of the most frequently misunderstood concepts in this entire course.

What "Always Deployable" Actually Means

The phrase "always deployable" sounds simple but has a precise technical meaning. It does not mean "the code compiles." It means that at any point in time, a stakeholder could ask an engineer to release the current state of the main branch to production, and that engineer could do so — safely, confidently, and within minutes — without needing to run manual checks, coordinate with other teams, or hope that nothing has drifted since the last release.

Achieving this state requires that the delivery pipeline be running continuously in the background. Every merge to main triggers not just the CI checks from Lesson 4, but a second, longer pipeline that promotes the verified build through a sequence of environments — typically staging, sometimes pre-production — running progressively deeper tests at each stage. By the time a build reaches the end of the pipeline, it has been subjected to every automated check the team has defined. The only thing left is the human decision.

The Loaded and Ready Analogy

Think of a commercial aircraft sitting at the gate. Before any passenger boards, the plane has been fuelled, inspected, loaded, and cleared by air traffic control. The captain does not start these processes when they decide to fly — everything is already done. The captain's decision to push back from the gate is purely about timing and business conditions, not technical readiness. Continuous Delivery puts software in the same state: the release is loaded and ready. The business decides when to push back.

The Delivery Pipeline: From Commit to Ready

The delivery pipeline extends the CI pipeline. Where CI focuses on fast verification of a single change, the delivery pipeline focuses on proving that the change is safe to ship in a production-like context. The stages grow progressively slower and more thorough as the build moves toward production.

The Delivery Pipeline — Stage by Stage

1 · CI Stage
Build, unit tests, linting, security scan. Fast — under 10 minutes. Runs on every commit. Already covered in Lesson 4.
2 · Artifact Creation
The verified build is packaged into a versioned, immutable artifact — a Docker image, a JAR, a binary. This exact artifact, unchanged, is what gets promoted through every subsequent environment.
3 · Staging Deploy
The artifact is automatically deployed to a staging environment that mirrors production in infrastructure, configuration, and data shape. Integration and end-to-end tests run here.
4 · Acceptance Tests
Automated tests that verify behaviour from a user's perspective — "a logged-in user can complete a checkout" rather than "the payment function returns 200." These are the final automated gate before human review.
5 · Approval Gate
A human — a product owner, a release manager, or the developer themselves — reviews the pipeline result and clicks to promote the build to production. This is the only manual step in the entire process.

The Approval Gate: A Business Decision, Not a Technical One

The approval gate is the defining characteristic of Continuous Delivery. It is what separates CD from Continuous Deployment. But understanding what the approval gate is for — and what it is not for — is critical.

The approval gate exists to answer business questions: Is this the right time to release this feature? Has the marketing campaign launched? Is the support team briefed? Are we within the release window allowed by our SLA? These are legitimate reasons to pause before releasing.

The approval gate does not exist to answer technical questions. If a reviewer is asking "but is it actually safe to release?" then the pipeline has failed — the automated stages should have answered that question already. An approval gate that acts as a manual technical review is a symptom of insufficient automated testing, not a feature of good CD practice.

Good vs Bad Reasons to Hold at the Approval Gate

✓ Legitimate Business Reasons
✗ Signs the Pipeline Is Incomplete
Waiting for a coordinated marketing launch
"We need to manually test this before releasing"
Holding for a compliance sign-off window
"We're not sure if it's safe — someone should check"
Bundling with a partner release that has a fixed date
"Let's wait until tomorrow when more people are around"
Timing a release with a customer briefing or demo
"The QA team hasn't had a chance to look at it yet"

Continuous Delivery vs Continuous Deployment

These two terms share an abbreviation (CD) and are frequently conflated, but they describe meaningfully different practices. The difference is a single gate: in Continuous Delivery, a human approves the final production release. In Continuous Deployment, that gate does not exist — every change that passes all automated checks is deployed to production automatically, with no human in the loop.

Neither is universally better. Continuous Deployment is the right choice for teams with high test confidence, mature monitoring, and a culture of small safe changes — typically SaaS products where fast iteration is a competitive advantage. Continuous Delivery is the right choice for organisations that have legitimate reasons to control release timing — regulated industries, enterprise software, products with coordinated launch requirements. Lesson 6 covers Continuous Deployment in dedicated depth.

A Continuous Delivery Release — Start to Production

10:02 AM
Developer merges a pull request to main. CI pipeline triggers automatically — build, tests, scan. Passes in 6 minutes.
10:08 AM
Delivery pipeline continues. Docker image is built and tagged v2.14.1. Automatically deployed to staging.
10:19 AM
End-to-end acceptance tests complete on staging. All 214 scenarios pass. Pipeline status: Ready to deploy.
2:30 PM
Product manager confirms the marketing email has been sent. She opens the pipeline dashboard and clicks Approve release.
2:32 PM
v2.14.1 is live in production. The same image that was tested on staging — nothing rebuilt, nothing re-packaged, nothing different.

Warning: Never Rebuild the Artifact for Production

The artifact built during CI must be the same artifact deployed to production — promoted unchanged through staging, pre-production, and finally production. Teams that rebuild the artifact from source at each environment introduce a silent risk: the build environment may differ slightly, producing a different binary. The whole point of artifact promotion is that what you tested is exactly what you ship. Rebuilding breaks this guarantee entirely.

Key Takeaways from This Lesson

Continuous Delivery means always deployable — not just "the code compiles," but that a production release could happen right now, safely, in minutes, with one human click.
The delivery pipeline extends CI — it takes the verified build, packages it into an immutable artifact, deploys it to staging, and runs acceptance tests before presenting it for approval.
The same artifact is promoted through all environments — it is never rebuilt. What was tested on staging is exactly what runs in production.
The approval gate answers business questions, not technical ones — if a team is using the gate to perform manual technical checks, their automated pipeline is not complete enough.
Continuous Delivery ≠ Continuous Deployment — CD keeps code release-ready with a human approving the final push. Continuous Deployment removes that gate entirely. Lesson 6 covers the distinction in full.
Releasing becomes a business decision — once the pipeline confirms technical readiness, the question shifts from "can we release?" to "should we release now?" That is a fundamentally healthier place to be.
Staging must mirror production — an acceptance test that passes on a staging environment that differs from production gives false confidence. Environment parity is a prerequisite for CD to mean anything.
CD is appropriate for all types of organisations — regulated industries, enterprise, and SaaS products alike benefit from always-deployable code. The approval gate simply reflects how much control the organisation needs over timing.

Teacher's Note

Ask your team: "If the CEO asked us to release right now, how long would it take and what would we need to do?" The answer tells you exactly how far you are from genuine Continuous Delivery.

Practice Questions

Answer in your own words — then check against the expected answer.

1. What is the name for the single manual step in a Continuous Delivery pipeline — the point where a human reviews the automated results and decides whether to promote the build to production?



2. In a Continuous Delivery pipeline, what is the versioned, immutable package — such as a Docker image or a JAR file — that is built once and promoted unchanged through staging and into production?



3. What is the name for the environment that mirrors production and is used to run acceptance tests automatically before a build is presented for human approval?



Lesson Quiz

1. A team's pipeline automatically builds, tests, and deploys every merge to staging. A product manager then reviews the result and clicks a button to release to production. Which practice is this?


2. A release manager is holding a build at the approval gate because they want to manually test the feature before it goes live. What does this indicate about the team's pipeline?


3. A team rebuilds their application from source code each time it is deployed to a new environment — first to staging, then to production. What risk does this introduce?


Up Next · Lesson 6

Continuous Deployment

Remove the approval gate entirely — learn how teams like Amazon and Netflix ship to production hundreds of times a day with zero human intervention, and what it takes to do it safely.