CI/CD

Also known as: Continuous integration and continuous delivery · CI/CD pipeline

On this page 7

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.

StageMain activitiesProblems it catches
SourceTrigger on commit or merge requestUnreviewed or unmerged changes
BuildCompile, resolve dependencies, packageSyntax errors, missing dependencies
TestUnit, integration and contract testsLogic regressions, broken interfaces
Security scanSAST, dependency and image scanningKnown vulnerabilities, leaked secrets
Deploy to stagingRelease artifact to a test environmentConfiguration and environment drift
Production releaseRolling, blue-green or canary rolloutErrors visible only under real traffic
Typical stages of a CI/CD pipeline

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.

PracticeAutomated scopeRelease decisionTypical fit
Continuous integrationBuild and test on every mergeNot part of the practiceAny team sharing a code base
Continuous deliveryBuild, test and staging deploymentManual approvalRegulated or scheduled releases
Continuous deploymentEntire path to productionFully automatedWeb services with strong test coverage
Levels of pipeline automation

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.

MetricWhat it measuresElite rangeLow range
Deployment frequencyHow often code reaches productionOn demand, several per dayMonthly or less
Lead time for changesCommit to running in productionLess than one dayOver one month
Change failure rateShare of releases causing incidentsRoughly 0 to 15 percentAbove 30 percent
Time to restore serviceRecovery after a failed changeLess than one hourOver one week
DORA metrics for delivery performance

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.

SymptomLikely causeRemedy
Flaky testsTiming dependencies, shared stateQuarantine, isolate data, fix root cause
Slow pipelinesSerial jobs, no cachingParallelize stages, cache dependencies
Works in staging, fails in productionEnvironment driftInfrastructure as code, identical artifacts
Long-lived branchesInfrequent mergingTrunk-based development, feature flags
Compromised pipelineOverprivileged runner credentialsLeast privilege, signed artifacts, short-lived tokens
Symptoms, causes and remedies

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.