# The Pipeline Is a Value Stream, Not a Build Script

- Published: 2026-09-04
- Updated: 2026-11-26
- Tags: Continuous Delivery, Books
- URL: https://devtrillo.com/writing/continuous-delivery-2-the-pipeline/

> Part 2 of a series reading _Continuous Delivery_, by Jez Humble and David Farley. Part 1: [Continuous Delivery Is a State, Not a Pipeline](/writing/continuous-delivery-1-a-state-not-a-pipeline/).

[Last time](/writing/continuous-delivery-1-a-state-not-a-pipeline/) the argument was that Continuous Delivery is a _state_ — your software is always releasable — and the pipeline is how you prove it.

So this time, the pipeline itself.

And here is the trap. Most people build a pipeline by accident. Someone wires up CI, someone bolts a deploy script onto the end, and that pile of YAML gets called "the pipeline." It runs some tests and then it ships.

That is a build script with stages. It is not what the book means.[^book]

> A deployment pipeline is an automated manifestation of your process for getting software from version control into the hands of your users.[^pipeline]

Read that as what it is: a _model_. The pipeline is a map of the actual path a change takes from your commit to a real user — every check, every gate, every promotion. It is the value stream, drawn in software.

**The pipeline is a value stream, not a build script.**

The difference is not pedantic. A build script asks one question: did the tests pass? A value stream asks a better one: where is this change right now, what has it earned, and what is the next thing standing between it and production?

## Every stage buys a different thing

Once you see the pipeline as a path, the stages stop being interchangeable "steps" and start being _gates_ — each one buying a specific kind of confidence, at a specific cost.

Click through them.

**The stages of a deployment pipeline, and what each one buys**

| Stage | Feedback | Cost to run | Catches |
| --- | --- | --- | --- |
| commit | ~5 min | cheap | compile + unit + static analysis |
| acceptance | ~30–60 min | expensive | does it behave, end to end |
| manual / UAT | human time | scarce | usability, exploration, sign-off |
| release | seconds | trivial | the push-button deploy |

- **commit.** The first gate, run on every push. It compiles, runs the fast unit tests, and does static analysis — everything that can come back before you've switched context. Most mistakes die here, while the change is still warm in your head. If it fails here: The build is broken. Nobody's code is releasable until it's green again, so fixing it comes before new work.
- **acceptance.** Automated acceptance tests run against a production-like deployment, written in the language of the business — does the invoice actually get sent? Slower and pricier, so it only runs on artifacts that already passed the commit stage. If it fails here: A real behavior regression. The change looked fine and quietly broke a user-facing outcome — exactly what staring at a diff would never catch.
- **manual / UAT.** Optional stages a human triggers: exploratory testing, a showcase, user acceptance. Not for regression — machines do that — but for the judgment only a person brings. Reached only by builds that earned it. If it fails here: Something the automated tests can't encode: a confusing flow, an ugly edge case, a 'that's not what we meant.'
- **release.** The same artifact that walked every stage above is promoted to production. One button. Because everything before it already proved the artifact safe, this step is boring by design. If it fails here: Rare — and recoverable. The same automation that ships forward ships back, so a bad release is an undo, not an incident.

Notice the shape. The stages get slower and more expensive as you go, and that ordering is the whole design. Cheap, fast checks run first and reject most mistakes in minutes. The slow, expensive checks run last, only on the few changes that already earned the right to be there. You spend your most expensive minutes on your most promising candidates.[^pipeline]

> **Note:** The artifact only moves in one direction, and it only moves forward by passing
> a gate. There is no "skip the tests, it's a hotfix" lane. The moment you add
> one, the pipeline stops modeling reality and goes back to being a build script
> you sometimes trust.

## The commit stage buys speed

The first gate is the one you live in all day, so it has a speed limit: the book wants the commit stage back in **under ten minutes**.[^commitstage]

That number sounds arbitrary until you feel it. Drag it.

**How commit-stage feedback time changes team behavior** (feedback time from 1 minute, "instant", to 30 min; the 10 min mark is the limit)

| Feedback time | How often it's run | What you do meanwhile | Description |
| --- | --- | --- | --- |
| 1-10 min | on every push | you wait for it | Under ten minutes, the commit stage lives inside your attention span. You push, you wait, you get an answer before you've moved on. The feedback loop stays tight, so you stay in it. |
| 11-20 min | a few times a day | you switch tasks | Past ten minutes, you stop waiting. You start another task, lose the context, and come back to a failure you now have to reload into your head. The loop is loosening. |
| 21-30 min | when you can't avoid it | you batch changes | Half an hour in, the commit stage is a tax. People batch up changes to 'make the wait worth it,' push less often, and start treating red as background noise. The fast feedback CD depends on is gone. |

The bar turns from blue to red as the time passes the 10 min mark.

Ten minutes is not about the computer. It is about you. Under ten minutes, the feedback lands while the change is still in your head — you push, you wait, you fix. Past it, you start another task, lose the context, and turn a two-line fix into an archaeology project. Past it far enough, the team quietly stops running the thing at all, and a commit stage nobody runs is not a gate. It is decoration.

So the commit stage is ruthlessly scoped: compile, unit tests, static analysis. The fast stuff. Anything slow — anything that needs a database, a network, a real environment — gets pushed to a later stage, precisely so the first gate stays fast enough to trust.

> **Tip:** If your commit stage is creeping past ten minutes, the fix is almost never a
> faster machine. It is moving the slow tests to the acceptance stage where they
> belong, and keeping the first gate for the checks that have to be instant.

## Build the artifact once

Here is a rule that sounds like a technicality and is actually load-bearing: you build the deployable artifact **exactly once**, at the start, and promote that same artifact through every stage.

You never rebuild per environment. The binary that runs your acceptance tests is the byte-for-byte binary that lands in production.

Why so strict? Because the whole pipeline is a chain of evidence about _one specific thing_. The moment you rebuild for production — even from the same commit — you are shipping an artifact that no stage actually tested. Different compiler, different dependency version, different machine, and every green checkmark behind you now refers to a build that no longer exists. You would be releasing on the strength of tests you ran against something else.

Build once, promote the same bytes, and a green pipeline means what it says.

## The acceptance stage buys confidence

If the commit stage answers "does it compile and hang together," the acceptance stage answers the question that actually matters: **does it still do what the business needs?**

These are automated tests run against a production-like deployment, and the book is insistent on one thing — they are written in the language of the domain, not the language of the UI. Not "click the button with id `#submit`." Instead: "when an overdue invoice is processed, a reminder is sent." The test describes the _behavior_, so it survives you reshaping the code underneath it. (That is the same green-tests-as-permission idea from the [refactoring post](/writing/refactoring-is-a-discipline/), scaled up from a function to a whole system.)

This stage is slow and expensive, which is exactly why it runs second. You do not spend an hour of compute proving out a change that could not even compile.

## Branching is where the pipeline rots

Now the part the book is quietly strict about, and where most teams undo everything above: branching.

A pipeline keeps mainline releasable. But it can only prove things about code that is actually _on_ mainline. Work that lives on a three-week feature branch is, as far as the pipeline is concerned, invisible — untested against everyone else's changes, accumulating a merge conflict with interest, and nowhere near releasable no matter how green the branch's own build is.

<div
  class="thinking-compare"
  aria-label="Long-lived feature branches compared with trunk-based development"
>
  <div class="thinking-row thinking-head">
    <span>Long-lived branches</span>
    <span>Trunk-based development</span>
  </div>
  <div class="thinking-row">
    <span>Integrate at the end, all at once</span>
    <span>Integrate into mainline every day</span>
  </div>
  <div class="thinking-row">
    <span>Merge is an event you dread</span>
    <span>Merge is a non-event, because it's tiny</span>
  </div>
  <div class="thinking-row">
    <span>The pipeline can't see your work</span>
    <span>Every change is on the line, proven</span>
  </div>
  <div class="thinking-row">
    <span>Unfinished = hidden on a branch</span>
    <span>Unfinished = on mainline, behind a flag</span>
  </div>
</div>

The book's answer is to integrate to trunk constantly and keep the branches tiny or nonexistent.[^trunk] Which raises the obvious objection: how do you put half-finished work on mainline without breaking everyone?

Two techniques. The first you already met in Part 1 — hide the unfinished feature behind a flag and merge it dark. The second is for when you are replacing something that already exists: **branch by abstraction**.

**Branch by abstraction: introduce a seam so old and new can coexist on mainline**

Before:

```ts
// callers depend on the old implementation directly
function quote(order) {
  return LegacyPricer.price(order);
}
```

After:

```ts
// callers depend on an abstraction; the impl swaps behind it
function quote(order) {
  return pricer.price(order);
  // pricer -> LegacyPricer today, NewPricer once it's ready
}
```

You introduce a seam — an abstraction over the thing you want to replace — and route everyone through it. Now the old and new implementations can live side by side _on mainline_, and you migrate callers a commit at a time, integrating every day, never once holding a giant unmerged branch. When the new one is ready you flip it on and delete the seam.[^branchbyabstraction]

It is the same move as branching, done in code you can test instead of in Git you cannot.

**Deep dive: Isn't a Git branch just simpler than all this abstraction?**

For a change you finish in an afternoon, yes — a short branch you merge same-day is fine, and trunk-based development explicitly allows it. The problem is the _long_ branch. A branch that lives for weeks trades a small, visible cost now (a seam, a flag) for a large, invisible one later (the merge, the untested integration, the "works on my branch"). Branch by abstraction and feature flags move the cost forward, into small tested steps on mainline, where the pipeline can actually watch it. The Git branch feels simpler because its bill arrives later — which is exactly the trap Part 1's "if it hurts, do it more often" is about.

## So, what is a deployment pipeline?

It is not the CI job that runs your tests. It is not the deploy script at the end.

It is a model of the whole path from commit to user: a chain of gates, ordered cheap-to-expensive, each buying a specific kind of confidence about **one artifact you built once**. The commit stage buys speed. The acceptance stage buys confidence. The later stages buy human judgment and the release itself. And branching discipline is what keeps real work on the line where the pipeline can see it.

Draw that map honestly and it tells you, at any moment, exactly where a change is and what stands between it and production. That is what turns "we have CI" into "we know this is releasable."

Next in the series: testing strategy — how you build an acceptance stage you can actually trust, and why "more tests" is not a plan.

[^book]: Jez Humble and David Farley, [_Continuous Delivery_](https://continuousdelivery.com/), Part II — "The Deployment Pipeline."

[^pipeline]: Martin Fowler, [DeploymentPipeline](https://martinfowler.com/bliki/DeploymentPipeline.html) — the pipeline as an automated manifestation of the path from commit to release, with fast stages first.

[^commitstage]: The commit stage and its roughly ten-minute budget are covered in the book's chapter on the commit stage; the goal is feedback fast enough that developers wait for it rather than moving on.

[^trunk]: See [Trunk-Based Development](https://trunkbaseddevelopment.com/) for the modern name of the practice the book argues for: integrate to mainline continuously, keep branches short-lived or absent.

[^branchbyabstraction]: Martin Fowler, [BranchByAbstraction](https://martinfowler.com/bliki/BranchByAbstraction.html) — making a large change gradually, on mainline, behind an abstraction layer, instead of on a long-lived branch.
