Course outline · 0% complete

0/29 lessons0%

Course overview →

From CI to CD: the pipeline

lesson 8-1 · ~10 min · 22/29

From unit 7, once CI passes on a commit to main, what exists that did not before is a tested Docker image, tagged with the commit hash, ready to be shipped.

The pipeline in lesson 7-3 ended with docker build -t myapp:${{ github.sha }}, so the artifact is both tested and traceable.

No user is running it yet, though. Getting it in front of users is deployment, which is this unit's subject.

CD, the next two letters

CI stops at the point where the code is tested. CD continues to the point where the code is running for users, and it has two meanings that interviewers like to separate.

TermFinal gate
continuous deliverya human presses deploy
continuous deploymentno button, green main ships itself

Either way, the full pipeline is one automated lane:

commit → test → build image → push to registry → deploy

Each stage only runs if the previous one succeeded, which is exit codes again from lesson 7-1.

The image that reaches production is the exact same bytes that passed the tests, because images are immutable as covered in lesson 1-2, and the registry from lesson 6-1 is the hand-off point between CI and the servers.

committestbuildpushdeployone commit rides the whole pipeline, stopping at the first red stage
A commit riding the CD pipeline. Every stage gates the next, and the image that deploys is byte-for-byte the one that passed the tests.

Naming a Thursday release ritual

Auto-packaging every green commit while a release manager clicks deploy each Thursday is continuous delivery.

Ready-to-deploy automatically plus a human trigger is delivery. Removing the human, so that a green main goes straight to production, makes it continuous deployment.

PracticePackagingDeploy trigger
continuous integrationtests onlynone
continuous deliveryautomatica person
continuous deploymentautomaticthe pipeline

It is the same pipeline in both CD cases, differing only in the final gate. That is why moving from delivery to deployment is usually a policy decision rather than an engineering project.

The other D

The word is deployment, which also names the last pipeline stage.

Continuous deployment removes the manual gate entirely. A merge to main where every automated stage is green means users are running that commit minutes later.

RequirementWhy it becomes mandatory
trustworthy testsnothing else stands between a bug and users
fast rollbackrecovery is the only remaining safety net

That combination is what lesson 8-3 builds. Teams that adopt continuous deployment without a rollback story usually retreat to delivery after their first bad afternoon.