CI/CD Pipeline
What is CI/CD Pipeline?
A CI/CD pipeline is an automated sequence of steps that builds, tests, checks and deploys code changes, carrying each change from a developer's commit through to production in a consistent, repeatable way.
Updated November 2026 · 2 min read
A CI/CD pipeline is the automated path code takes from a developer's commit to production. Each change moves through a series of stages, such as build, test, security checks and deployment, and stops if any stage fails. Because the same steps run the same way every time, releases become repeatable and predictable rather than manual, error-prone events.
The pipeline brings together continuous integration, which merges and tests every change, and continuous delivery, which keeps every passing change ready to release. Popular tools for building pipelines include GitHub Actions, GitLab CI/CD, Jenkins and the pipeline services of the major cloud providers.
Stages of a CI/CD pipeline
- Source: a commit or merge triggers the pipeline.
- Build: compile the code and package it, often as a container image.
- Unit tests and static checks: fast tests, linting and code quality checks.
- Security scans: dependency vulnerabilities, secrets in code and static security analysis. See DevSecOps.
- Integration and acceptance tests in a production-like environment.
- Deploy to staging and, optionally, run further checks.
- Deploy to production, automatically or after approval, often gradually. See canary deployment.
- Post-deployment checks: automated health checks and monitoring, with rollback if they fail.
CI/CD pipeline best practices
- Fast feedback first: run quick tests early, slower tests later.
- Build once, deploy many times: the same artifact moves through every environment.
- Everything as code: pipeline definitions, infrastructure and configuration in version control.
- Reliable tests: flaky tests erode trust and slow everything down.
- Easy rollback.
- Visible results for everyone.
CI/CD pipeline example
Consider a hypothetical insurer whose releases involve a 60-page run book and three teams copying files between servers. Releases take a weekend, and configuration differences between environments cause frequent failures. The insurer builds a pipeline that packages each service as a container, runs tests and security scans and deploys the same container to test, staging and production using infrastructure defined in code. Production deployments still need a business approval, which takes one click. Release time falls from a weekend to under an hour, and environment-related failures stop.
Common pitfalls
- Slow pipelines, which push developers to batch changes.
- Manual steps hidden inside an "automated" process.
- Rebuilding for each environment, so production runs something different from what was tested.
- Pipeline sprawl: every team building its own from scratch. See platform engineering.
Pipeline speed and reliability show up directly in DORA metrics.
Frequently asked questions
What steps does a typical CI/CD pipeline run?
A commit triggers the pipeline, which builds and packages the code, runs fast unit tests and static checks, scans for security issues and runs integration and acceptance tests in a production-like environment. It then deploys to staging and to production, often gradually, and finishes with automated health checks that can trigger rollback. Any failed stage stops the change.
What tools are used to build CI/CD pipelines?
Popular CI/CD pipeline tools include GitHub Actions, GitLab CI/CD, Jenkins and the pipeline services of the major cloud providers. The tool matters less than how the pipeline is run: definitions kept in version control, fast tests first, one artifact built once and deployed to every environment, and reliable tests that developers trust.
Why should a CI/CD pipeline build once and deploy many times?
Building one artifact and moving that same artifact through test, staging and production means production runs exactly what was tested. Rebuilding for each environment lets small differences creep in, so a change that passed testing can still fail in production. Combined with infrastructure defined in code, it removes a common source of environment-related release failures.
Related terms
Continuous Integration (CI)
Merging code often, with every change built and tested automatically.
Continuous Delivery (CD)
Keeping software always releasable so any change can ship on demand.
DevSecOps
Security built into every stage of fast, automated software delivery.
Canary Deployment
Releasing to a small share of users first, then expanding if it's healthy.