CI/CD explained: the stages, and the kinds of pipeline

What continuous integration, delivery and deployment mean, the stages a change goes through, the kinds of pipeline teams run, and where testing fits.

Checked 24 November 20264 min read

CI/CD is how a change gets from someone's editor to the people using your site, with checks along the way so a broken change stops before it reaches them. The letters stand for three ideas that build on each other.

Three ideas in two letters

  • Continuous integration (CI): everyone's changes are merged into one main line often, at least daily, and every change is built and tested automatically when it's proposed. Small, frequent merges are easier to check than big, rare ones.
  • Continuous delivery (CD): every change that passes is ready to release at any time. A person still decides when it goes out.
  • Continuous deployment (also CD): every change that passes goes out by itself, with nobody pressing a button. It needs tests you trust, because nothing else stands between a change and your users.

Most teams start with integration, add delivery, and move to deployment only once their tests rarely give false alarms.

The stages a change goes through

StageWhat happensWho's waiting
Commit and pushthe change is saved and sharedthe author
Pull requestit's built, tested and reviewed, often on a preview copy of the sitethe author and a reviewer
Mergeit joins the main line; the main line is built and tested againnobody, usually
Release or deploythe main line goes to staging, then to the live sitethe team
After releasethe live site is watched: monitoring, scheduled tests, alertsnobody, until it breaks

Each stage asks a different question, so each tests at a different depth: fast and narrow where people wait, wide where they don't (what to test at each stage).

The kinds of pipeline

A pipeline in your code host. GitHub Actions, GitLab CI, Bitbucket Pipelines: a file in the repository (YAML) lists the jobs, and the code host runs them on each push, pull request or merge. The most common kind, and the easiest to start with.

A separate CI server. CircleCI, Buildkite, Jenkins, TeamCity: the same idea, run by a separate service or on your own machines. Teams choose them for speed, cost, or builds that need special hardware.

Your hosting platform's own. Vercel, Netlify, Cloudflare Pages and Render build each push themselves and give every pull request a preview address. They tell your code host when a deploy is ready, so a test can start the moment it's up.

Built into a tool. Some checks need no pipeline at all: a service that watches your live site and tests it when it changes, or every day.

Your coding agent. An agent that writes the change can run the tests too: it starts a test, reads why it failed, fixes the code and tests again before it says it's done (a test loop for your coding agent). Rules for it live in the repository (AGENTS.md, CLAUDE.md), like any other part of the pipeline.

Ways to release safely

  • Preview deploys: every pull request gets its own copy of the site to test and review before it merges.
  • Staging: a copy of the live site that the main line deploys to first.
  • Blue-green: two live copies; switch traffic to the new one, and back in one step if it breaks.
  • Canary: send a small share of visitors to the new version first, and widen it once it holds.
  • Feature flags: ship the code switched off, and turn it on for some people, then everyone.
  • Rollback: whatever you choose, know how to undo a release in minutes.

Where testing fits, and when it should block

A test earns the right to stop a release by being right. Start each stage reporting only, count how often it raises a false alarm or misses a real break, and let it block once it's reliable. A test that couldn't run (a device was locked, a lab lost its network) is not your site's failure and should never block anything.

With PocketQA

PocketQA tests each stage on your own real phones and browsers: a pull request's preview from GitHub Actions or any CI, the main line after a merge, the live site after each deploy and every day. Your coding agent can start a test and read the result itself, and each site chooses whether a failure only reports or stops a release.

Related guides