DevOps, SRE & Cloud Interview · CI/CD & Automation · Lesson 1 of 3
CI vs CD and the pipeline
Continuous Integration (CI) means every commit is automatically built and tested against the shared mainline, many times a day, so integration problems surface in minutes instead of at a big merge. Continuous Delivery (CD) means every green build is automatically prepared into a deployable artifact and can be released with one click; Continuous Deployment goes further and ships every green build to production with no human gate.
- CI: build + unit/integration tests on every push; fast feedback, keep the mainline green.
- Continuous Delivery: any commit that passes is releasable, but a human chooses when to push the button.
- Continuous Deployment: no button — every passing commit goes to prod automatically.
- The shared goal: shrink the batch size and the feedback loop so failures are small and cheap to fix.
# A minimal pipeline (any CI system) stages: - build # compile / package, produce an immutable artifact - test # unit, integration, lint, security scan - publish # push image to a registry, tag by commit SHA - deploy # roll out to staging, then prod (gated or automatic)
The artifact is built onceA core principle: build the artifact once and promote the same immutable image through staging and prod. Rebuilding per environment reintroduces the 'works on my machine' drift you were trying to kill.
◆ Lock it in
- CI = integrate + test every commit; keep the mainline green.
- Continuous Delivery = always releasable (human button); continuous Deployment = auto to prod.
- Build the artifact once and promote the same image through environments.
Feynman drill — say it out loudExplain the difference between continuous delivery and continuous deployment, and why you build an artifact only once.
Step 1 rate your confidence · Step 2 pick your answer
What distinguishes continuous deployment from continuous delivery?
Step 1 — how sure are you?