DevOps Peach

DevOps & CI/CD · DevOps Overview & CI/CD Pipeline · Lesson 3 of 4

CI, Continuous Delivery and Continuous Deployment

CI integrates and tests every change automatically; Continuous Delivery keeps every build ready to release but production needs a human approval; Continuous Deployment goes to production automatically.

Practice interactively →

Continuous Integration Continuous Delivery Continuous Deployment
Scope Plan → Test up to Release up to production Deploy
Each commit Automatic build + test on a shared branch Becomes a release-ready artifact, deployed to staging Reaches production if every check passes
Step to production — Human approval (a button) Automatic, no approver
Prerequisites Small, frequent commits to main Reliable pipeline, matching environments Excellent automated tests, feature flags, fast rollback
flowchart LR
  C["Commit"] --> B["Build"] --> T["Test"] --> S["Deploy staging"] --> G{"Approve?"}
  G -- "Continuous Delivery: a person clicks" --> P["Production"]
  G -. "Continuous Deployment: automatic" .-> P

DORA metrics measure delivery performance:

Metric Question
Deployment frequency How often do you deploy to production?
Lead time for changes How long from commit to production?
Change failure rate What % of deployments cause an incident?
Time to restore service How long to recover from an incident?

Trap: mixing up the two "CD"s — Delivery has a manual approval step, Deployment does not.

Command Meaning
git log --oneline main..feature/login Commits on feature/login not yet integrated into main

Anatomy of a pipeline

commit → build → unit tests → static analysis → package (image/artifact)
       → deploy to test → integration tests → approval → deploy to production
Building block Meaning
Trigger What starts a run: a push, a pull request, a schedule, a manual button
Stage / job / step Groups of work; jobs can run in parallel on different agents
Agent / runner The machine or container that executes the steps
Artifact The output passed between stages: a JAR, a ZIP, a container image
Environment A deployment target such as dev, staging, prod, often with its own approvals and secrets

Principles that make CI/CD work

Shift left

Testing and security checks moved earlier ("left") in the pipeline find problems when they are cheap to fix: linting and unit tests on every commit, dependency and container scanning before an image is published, infrastructure checks before terraform apply.

Popular tools

Jenkins, GitHub Actions, GitLab CI/CD, Azure Pipelines, CircleCI, and cloud-native options such as AWS CodePipeline all implement the same ideas with different syntax. The concepts in this module carry over between them; the Jenkins and Azure DevOps modules show two in detail.

Practice interactively →