Side by side
Continuous IntegrationvsContinuous Delivery
What is the difference between CI and CD?
Updated 3 min read8 differences
In short
CI merges and tests every change on the main branch automatically; CD keeps each tested build ready to release, and continuous deployment releases it.
Continuous Integration
Continuous integration is the practice of merging code changes into a shared main branch at least daily, with an automated build and tests checking every merge.
Read the page on Continuous IntegrationContinuous Delivery
Continuous delivery is the practice of keeping software ready to release at any time, with an automated pipeline building, testing and preparing every change.
Read the page on Continuous DeliveryContinuous Integration and Continuous Delivery compared
| Aspect | Continuous Integration | Continuous Delivery |
|---|---|---|
| Goal | Prove that every merged change builds and passes the tests | Keep every verified change ready to release to production |
| Starts with | A push or pull request to the shared repository | A build that has passed CI on the main branch |
| Ends with | Verified code on the main branch | A tested artifact that can go live in one routine step |
| Typical steps | Install, compile, lint, run unit and integration tests | Deploy to staging, run acceptance, performance and security checks |
| Feedback time | Minutes; about ten is a common target | Longer, as the artifact moves through each environment |
| Release decision | None: CI doesn't deploy anything | A person approves, or the pipeline in continuous deployment |
| Key habits | Small, frequent merges and fixing a red build first | Build once, promote the same artifact, automate every environment |
| Needs | Automated tests and a shared main branch | Working CI, automated deployments and monitoring |
The difference, explained
Continuous integration (CI) is the practice of merging small changes into the shared main branch at least once a day, with an automated build and test run checking every merge. Continuous delivery (CD) picks up where CI ends: every change that passes moves on through an automated deployment pipeline, with staging environments and further tests, so the software can be released to production at any moment.
The essential difference is the question each one answers. CI asks whether the combined code still works, and ends with verified code on the main branch, ideally within about ten minutes of a push. CD asks whether that code can go live safely, and ends with a tested artifact, such as a container image, that can be released in one routine step.
The letters CD also stand for continuous deployment, which goes one step further and removes the manual approval: every change that passes the pipeline goes to production automatically, often many times a day. In continuous delivery a person decides when to release; in continuous deployment the pipeline decides. That needs a very reliable test suite, good monitoring and safety nets such as canary deployments, automatic rollbacks and feature flags.
They are stages of one pipeline rather than alternatives, which is why they are written together as CI/CD: CD builds on CI, and without CI there is nothing reliable to deliver. A common misconception is that having a CI tool means doing CI, but running builds on feature branches that live for weeks misses the point of integrating small changes often. Another is that continuous delivery means releasing constantly: it means being able to release at any time, while the timing can stay a business decision.
Which one should you use?
Choose Continuous Integration when…
- You are starting out: CI is the foundation every delivery pipeline needs.
- Merges are painful and broken builds are found days late.
- You want fast feedback on every pull request.
- Releases follow a fixed schedule, such as app store updates, but the code must stay healthy every day.
Choose Continuous Delivery when…
- CI is already reliable, but releases are still slow, manual or risky.
- You want to ship small changes whenever the business decides.
- Every environment can be created and deployed automatically.
- Tests, monitoring and rollbacks are strong enough to go on to continuous deployment.
A CI workflow and a CD workflow in GitHub Actions
# CI: verify every pull request and every push to main
on:
pull_request:
push: { branches: [main] }
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- run: npm ci
- run: npm test
- run: npm run build# CD: deploy each verified build to staging, then to production
on: { push: { branches: [main] } }
jobs:
staging:
runs-on: ubuntu-latest
steps: [{ uses: actions/checkout@v5 }, { run: ./deploy.sh staging }]
production:
needs: staging
environment: production # with required reviewers: continuous delivery
runs-on: ubuntu-latest # without them: continuous deployment
steps: [{ uses: actions/checkout@v5 }, { run: ./deploy.sh production }]Readers ask
Does CD mean continuous delivery or continuous deployment?
Both are used. Continuous delivery keeps every change ready and leaves the release to a person; continuous deployment releases every change that passes automatically. If production releases need an approval, it is continuous delivery.
Can you have CI without CD?
Yes, and many teams start that way: every change is built and tested, but releases are still prepared by hand. The reverse doesn't work, because continuous delivery depends on CI to supply verified builds.
Which tools are used for CI and CD?
Usually the same ones: GitHub Actions, GitLab CI, Jenkins and similar services run both the CI checks and the deployment pipeline. Some teams add dedicated deployment tools, such as Argo CD for Kubernetes.