Continuous Integration (CI) means every developer merges small changes into the main branch often, and every push is built and tested automatically. The goal is to catch "it works on my branch" problems within minutes, not at the end of a sprint.
"CD" means one of two things, and interviewers love the difference:
| Practice | What happens after tests pass |
|---|---|
| Continuous Delivery | The change is packaged and deployed to staging. It is always ready to release, but a human clicks the button for production. |
| Continuous Deployment | The change goes all the way to production automatically. No human approval. |
Each one builds on the one before it: you cannot do continuous deployment without solid CI and a delivery pipeline you trust.
commit → build → test → deploy to staging → [approve] → production
└──── CI ────┘
└──────── Continuous Delivery (manual approve) ────────┘
└──────── Continuous Deployment (no approve step) ─────┘The trap: saying "CD means deploying to production automatically". That is only continuous deployment. Continuous delivery keeps a manual gate.
In interviews: "What is the difference between continuous delivery and continuous deployment?" Answer with the approval step, and add that continuous deployment needs strong automated tests and monitoring because no human checks the release.