CI/CD, short for continuous integration and continuous delivery, is the DevOps practice of merging code changes frequently and moving each change through an automated pipeline that builds, tests and prepares it for release, so that software can reach production quickly, safely and repeatably. The term often also covers continuous deployment, in which every change that passes the pipeline is released without a manual approval step.
In DevOps and Cloud engineering, a CI/CD pipeline is the backbone that connects a version control repository to running environments. It replaces manual builds and hand-copied release artifacts with a defined sequence of stages that runs the same way for every commit.
How a CI/CD pipeline moves a change
A CI/CD pipeline moves a change from commit to production through ordered stages with quality gates. A push or merge request triggers the pipeline, a runner checks out the code, and each stage must succeed before the next one starts. A failure stops the flow and notifies the author within minutes, while the context is still fresh.
The integration half focuses on fast feedback on every commit: compiling, running unit tests and static analysis, and producing a versioned artifact. The delivery half takes that immutable artifact and promotes it through environments such as staging and production, applying deployment strategies and verification checks along the way.
The table below shows the typical stages and what each one is expected to catch.
| Stage | Main activities | Problems it catches |
|---|---|---|
| Source | Trigger on commit or merge request | Unreviewed or unmerged changes |
| Build | Compile, resolve dependencies, package | Syntax errors, missing dependencies |
| Test | Unit, integration and contract tests | Logic regressions, broken interfaces |
| Security scan | SAST, dependency and image scanning | Known vulnerabilities, leaked secrets |
| Deploy to staging | Release artifact to a test environment | Configuration and environment drift |
| Production release | Rolling, blue-green or canary rollout | Errors visible only under real traffic |
Continuous delivery versus continuous deployment
The letters CD stand for two related but distinct practices, and the difference lies in who presses the release button. Under continuous delivery, every passing build is always releasable, but a person or business process decides when it goes live. Under continuous deployment, the pipeline releases automatically once all checks pass.
| Practice | Automated scope | Release decision | Typical fit |
|---|---|---|---|
| Continuous integration | Build and test on every merge | Not part of the practice | Any team sharing a code base |
| Continuous delivery | Build, test and staging deployment | Manual approval | Regulated or scheduled releases |
| Continuous deployment | Entire path to production | Fully automated | Web services with strong test coverage |
Continuous deployment is not automatically superior. It demands comprehensive automated tests, reliable monitoring and fast rollback; without them, automation simply delivers defects faster.
Measuring CI/CD performance
CI/CD performance is most commonly measured with the four DORA metrics, which capture both delivery speed and stability. The research program behind them consistently found that high-performing teams improve throughput and reliability together rather than trading one for the other.
The following ranges describe what elite and low performers typically report; individual organizations vary with product type and regulatory context.
| Metric | What it measures | Elite range | Low range |
|---|---|---|---|
| Deployment frequency | How often code reaches production | On demand, several per day | Monthly or less |
| Lead time for changes | Commit to running in production | Less than one day | Over one month |
| Change failure rate | Share of releases causing incidents | Roughly 0 to 15 percent | Above 30 percent |
| Time to restore service | Recovery after a failed change | Less than one hour | Over one week |
Pipeline health itself deserves monitoring too. Pipeline duration, flaky test rate and queue time reveal friction early; a build that takes longer than about ten minutes tends to discourage frequent integration.
Tools and pipeline design choices
CI/CD is implemented with dedicated platforms that execute pipeline definitions stored as code, usually as YAML files in the same repository as the application. Keeping the pipeline in version control makes changes reviewable and lets every branch carry its own build logic.
- Hosted platforms such as GitHub Actions, GitLab CI/CD, CircleCI and Azure DevOps provide managed runners and tight repository integration.
- Self-managed servers such as Jenkins offer deep plugin ecosystems and full control at the cost of maintenance.
- GitOps controllers such as Argo CD pull desired state from Git and reconcile Kubernetes clusters, separating build from deployment.
- Artifact repositories and container registries store versioned outputs so the same build is promoted, never rebuilt.
Sound design follows a few principles: build once, deploy many, keep secrets in a dedicated vault rather than pipeline files, run the fastest tests first, and make every environment as close to production as practical.
Common CI/CD failures and their fixes
Most CI/CD problems are not tool defects but process and design issues that erode trust in the pipeline. Once engineers stop believing a red build, the practice loses its value.
| Symptom | Likely cause | Remedy |
|---|---|---|
| Flaky tests | Timing dependencies, shared state | Quarantine, isolate data, fix root cause |
| Slow pipelines | Serial jobs, no caching | Parallelize stages, cache dependencies |
| Works in staging, fails in production | Environment drift | Infrastructure as code, identical artifacts |
| Long-lived branches | Infrequent merging | Trunk-based development, feature flags |
| Compromised pipeline | Overprivileged runner credentials | Least privilege, signed artifacts, short-lived tokens |
The pipeline is also a supply chain attack target. Frameworks such as SLSA recommend provenance attestations and isolated build environments so that a release can be traced to its exact source.
In everyday language
Imagine a bakery where every new recipe change is tasted and checked the moment it is made, instead of waiting until the end of the month. Problems are spotted while they are small and easy to fix.
CI/CD does the same for software. Each time a developer saves a change, machines automatically build and test it, then carry it step by step toward customers. The result is that updates arrive more often and with fewer surprises.
Seen in the real world
An online retailer with a team of 40 engineers used to release its checkout service once a month after a weekend of manual testing. Releases often failed, and rolling back took most of a day.
The team introduced a CI/CD pipeline that runs about 2,000 unit tests and a contract test suite on every merge in roughly eight minutes, publishes a container image to a registry, and deploys it to staging automatically. Production releases use a canary rollout to 5 percent of traffic, with automatic rollback if the error rate exceeds a set threshold.
Within six months, the team moved from monthly releases to several deployments per day. Lead time for changes dropped from about three weeks to under one day, and recovery from a bad release shrank to less than fifteen minutes.