Building Production Software

CI/CD Pipelines Explained: What They Are and How to Set One Up

A CI/CD pipeline is the automated route a code change takes from a developer’s machine to your users. A good one makes releases small, frequent and dull. This guide explains the parts in plain terms and shows how to build a first one.

By Rahul D SarkerPublished November 17, 2026Updated November 17, 20265 min read

Part of our Building Production Software series. Start with Production-Grade Software: Engineering Practices That Prevent Technical Debt.

The Short Answer

What is a CI/CD pipeline?

A CI/CD pipeline is an automated sequence that takes each code change, builds it, tests it and releases it. CI, continuous integration, means developers merge small changes into a shared codebase often, with automated checks on each one. CD means continuous delivery, where every passing change is ready to release at the press of a button, or continuous deployment, where it is released automatically.

Without a pipeline, releasing software is a manual event: someone builds the code, copies files to a server and hopes. That makes releases rare, large and risky. With a pipeline, a release is routine and happens many times a week.

Read the transcript

You would expect the teams that release software most often to break things most often. Years of DORA research across thousands of teams found the opposite. Teams that release often also fail less, and recover faster. The reason is size. A release with one change is easy to check, and easy to undo. A release with three months of changes is neither. So how do you make releases small, frequent and dull? With a pipeline. An automated route from a code change to your users. Commit. Build. Test. Review. Then deploy, and watch. Measure it with four numbers. How often you deploy. How long a change takes to go live. How often a release fails. And how fast you recover. A small team can set one up in a day or two. Protect the main branch. Run checks on every change. Keep it under ten minutes. And release with one action. Speed and stability aren’t a trade-off. Small changes give you both. The full guide is free at loomstrat.com.

The Three Terms

CI, continuous delivery and continuous deployment
TermWhat happensWho presses the button
Continuous integrationEvery change is merged into the main codebase frequently and checked by an automated build and testsNot applicable
Continuous deliveryEvery change that passes is packaged and proven ready for productionA person approves the release
Continuous deploymentEvery change that passes goes to production automaticallyNobody

Martin Fowler’s article on continuous integration sets out the practice: everyone commits to the main line frequently, every commit triggers a build, and a broken build is fixed at once. Jez Humble and David Farley’s continuous delivery extends it to the point where the software can be released at any time.

The Stages of a Pipeline

  1. 1

    Commit

    A developer pushes a change to version control and opens a pull request.

  2. 2

    Build

    The pipeline installs dependencies and compiles or bundles the application from scratch, so that it never depends on one person’s machine.

  3. 3

    Static checks

    Formatting, linting, type checking and a scan for known-vulnerable dependencies and leaked secrets.

  4. 4

    Automated tests

    Fast unit tests first, then integration tests against a real database.

  5. 5

    Review

    Another developer reads and approves the change.

  6. 6

    Package

    The build is stored as a versioned artefact, such as a container image. The same artefact moves through every environment.

  7. 7

    Deploy to a test environment

    A copy of production where end-to-end tests run and people can try the change.

  8. 8

    Deploy to production

    Automatically or after approval, using a method that avoids downtime.

  9. 9

    Verify and monitor

    Health checks and error-rate alerts confirm the release is sound; if not, roll back.

Why It Matters to the Business

  • Smaller releases, smaller risk. A release with one change is easy to check and easy to undo. A release with three months of changes is neither.
  • Faster feedback. A bug found in ten minutes by an automated test costs far less than one found by a customer.
  • No dependence on one person. Anyone on the team can release, because the process is in the pipeline and not in someone’s memory.
  • An audit trail. Every change shows who wrote it, who approved it, which tests ran and when it went live.
  • Quicker recovery. When something breaks, the previous version is one step away.

How to Measure It: The Four DORA Measures

The DORA research programme, now part of Google Cloud, has studied software delivery across thousands of teams. Its four key measures are the standard way to judge a delivery process.

The four DORA measures
MeasureQuestion it answersKind
Deployment frequencyHow often do you release to production?Speed
Lead time for changesHow long from a commit to that commit running in production?Speed
Change failure rateWhat share of releases cause a problem that needs fixing?Stability
Time to restore serviceHow long does it take to recover from a failed release?Stability

DORA’s consistent finding is that speed and stability go together. Teams that release often also fail less and recover faster, because small changes are safer than large ones.

A First Pipeline for a Small Team

You do not need a platform team. A hosted service such as GitHub Actions, GitLab CI or the pipeline built into your hosting provider is enough.

  1. 1

    Protect the main branch

    No direct pushes. Every change arrives by pull request with one approval.

  2. 2

    Run checks on every pull request

    Install, lint, type-check, build and run the tests. Block merging if any fail.

  3. 3

    Keep it under ten minutes

    A slow pipeline gets bypassed. Cache dependencies and run jobs in parallel.

  4. 4

    Create a preview for each pull request

    A temporary copy of the app at its own address lets reviewers and non-developers see the change.

  5. 5

    Deploy main automatically to a test environment

    So that it always shows the latest merged work.

  6. 6

    Release to production with one action

    A button or a tag, never a set of manual commands.

  7. 7

    Handle database changes in the pipeline

    Migrations run as a step, written so that the old and new code can both run during the switch.

  8. 8

    Add a rollback

    Redeploying the previous artefact should take minutes.

  9. 9

    Keep secrets out of the code

    Store keys in the pipeline’s secret store, with separate values for each environment.

Common Mistakes

  • Unreliable tests. A test that fails at random teaches the team to ignore failures. Fix or remove it.
  • Long-lived branches. Work kept apart for weeks is not continuous integration, whatever tool runs it.
  • Rebuilding for each environment. Build once and promote the same artefact; otherwise you test one thing and release another.
  • Manual steps that remain. One hand-edited configuration file undoes the benefit.
  • No monitoring after release. A pipeline that stops at “deployed” does not know whether the release worked.

Pipelines pair naturally with feature flags and progressive rollouts, which let you release code without yet showing it to everyone. Both are part of what we mean by production-grade software, and both are set up from the first week of a Loomstrat build.

Frequently Asked Questions

What does CI/CD stand for?

Continuous integration and continuous delivery or continuous deployment. Together they describe automating the build, test and release of software.

What is the difference between continuous delivery and continuous deployment?

In continuous delivery a person approves each production release. In continuous deployment every change that passes the checks is released automatically.

Does a small startup need CI/CD?

Yes. A basic pipeline takes a day or two to set up and prevents the most common release failures. It is cheaper to start with one than to add it later.

Which CI/CD tool should I use?

For most teams, the one built into your code host, such as GitHub Actions or GitLab CI. The practices matter more than the tool.

How long should a CI pipeline take?

Aim for under ten minutes for the checks on a pull request. Longer than that and developers start working around it.

What are DORA metrics?

Four measures of software delivery: deployment frequency, lead time for changes, change failure rate and time to restore service.

Have a build brief already forming in your head?

Loomstrat Studio scopes, builds, and hands over production software in 3–6 weeks - fixed price, 100% repository ownership.

  • Reply within 24 hours
  • Fixed price before we start
  • Zero technical debt guarantee