MyTechTeam Logo

devops-foundations

What a release should actually do

A good pipeline isn't the one with the most stages. What each stage of a CI/CD pipeline is really for, the order that makes releases boring, and the mistakes that quietly cost you.

DevOpsInfrastructure
What a release should actually do

There's a tell for how healthy a team's delivery is, and it isn't a metric. It's what time of day they deploy. Teams that deploy on Friday afternoon have a pipeline they trust. Teams that deploy at 9pm on a Tuesday with three people watching a chat channel have a ritual.

The difference isn't tooling — both teams have a pipeline, and it's probably the same product. The difference is what the pipeline is for. One is a machine for finding out whether a change is safe. The other is a machine for applying a change and hoping.


The one question a pipeline answers

Strip away the stages and a release pipeline exists to answer one thing: is this change safe to put in front of customers, and if it isn't, how fast can we stop?

Every stage either contributes to that answer or is theatre. That's a useful lens to audit an existing pipeline with, because most have accumulated stages nobody can justify and are missing one that would have caught the last three incidents.

What we'd do

Ask of every stage: what does this stop? If nobody can name a specific failure it has caught or would catch, it's costing you minutes on every deploy and buying nothing. Slow pipelines don't just waste time — they teach people to batch changes, and big batches are what actually break production.


What each stage is genuinely for

A release that answers the question
  1. Build once One artefact, promoted through environments — never rebuilt
  2. Fast checks Lint, unit tests, static analysis. Seconds, not minutes
  3. Slow checks Integration tests against real dependencies
  4. Deploy to staging Same mechanism as production, or it proves nothing
  5. Deploy to production Gradually, with a health signal that can halt it
  6. Watch, and be able to stop Rollback as a routine action, not an emergency

Each stage fails faster and cheaper than the one after it. That ordering is the whole design.

Build once, promote the artefact

The most commonly broken rule, and the most expensive. If your pipeline builds separately for staging and production, you tested a different thing than you shipped. Everything downstream is now evidence about an artefact that no longer exists.

Build one artefact. Promote that exact artefact through each environment. Configuration changes between environments; the thing being deployed does not.

Order the checks by speed, not importance

Run what fails fastest first. A linter that fails in four seconds should never sit behind an integration suite that takes eleven minutes — not because linting matters more, but because feedback that arrives after a context switch costs vastly more than feedback that arrives before one.

Staging has to deploy the same way as production

If staging is deployed by the pipeline and production is deployed by a person with SSH access and a runbook, staging is not testing your deployment. It's testing your application, which is the half that was probably fine. The deployment mechanism is the part that breaks, and it's the part you've left untested.

Rollback is a feature, not a fallback

The teams who deploy on Friday can undo it by Friday evening without a meeting. Rollback that's been rehearsed is a routine action. Rollback that's theoretical is a document that gets read for the first time during an incident, by someone stressed, at an hour when they're bad at reading.

Common trap

If your rollback plan is "roll forward with a fix," you don't have a rollback plan — you have an intention to write code under the worst conditions available. That's fine as a second option. It's a poor first one.


The mistakes that cost most

  • Environments that drift. Production doesn't match staging, so bugs only appear after release. This is the root cause behind most "the pipeline didn't catch it" incidents, and no amount of extra test stages fixes it. Reproducible infrastructure does.
  • A test suite nobody trusts. One flaky test teaches the team that red doesn't mean broken. After that the pipeline is decoration — it goes red, someone re-runs it, and the signal is gone. A suite that's 95% reliable is worse than one that's 80% as long as everyone knows which.
  • Manual approval as a substitute for confidence. A human clicking approve on a change they can't assess isn't a control. It's a signature on a decision that was already made, and it's there to spread blame rather than reduce risk.
  • Secrets in the pipeline. Credentials in environment variables, in the repo, in someone's shell history. It works right up until it's an incident report.
  • One person who can deploy. The pipeline exists and yet deploys still happen through someone's laptop, because that's where the credentials are.

What "boring" looks like

Our own trailing numbers, for scale rather than as a target: four minutes mean deploy time, zero open Sev-1s, 99.98% uptime over the last 90 days. The four minutes is the interesting one — not because fast deploys are impressive, but because a four-minute deploy is one you'll do ten times a day. And ten small deploys a day is a fundamentally different risk profile than one large deploy a fortnight.

That's the actual argument for pipeline investment, and it isn't speed. Small changes fail small. A deploy that takes an hour gets batched, batches get large, and large changes fail in ways that are hard to attribute — which is why the team that deploys fortnightly spends more time debugging releases than the team that deploys hourly.

We built exactly this for a global cybersecurity enterprise under SOC 2: baseline automation with Chef and Ubuntu Pro producing CIS-compliant environments, and a CI pipeline on top of it. Note the order — the environments became reproducible first, and then the pipeline was worth having. A pipeline deploying to servers that drift is just a faster way to be surprised.


Where to start if yours isn't there

Find out what a deploy actually involves

Not the documented version. Watch one. Count the manual steps, and note who has to be awake.

Fix environment drift before adding stages

If staging and production differ in ways nobody can enumerate, extra test stages test a fiction. Reproducibility first — it's the prerequisite for everything else.

Make one artefact, promoted

Stop rebuilding per environment. This single change makes every later stage mean something.

Rehearse a rollback in daylight

Do it on a normal Wednesday with no incident. If it doesn't work, you've learned that at the cheapest possible moment.

Cut the stages that stop nothing

Then use the time you got back to add the one that would have caught your last incident.


Frequently asked questions

One that answers a single question: is this change safe to ship, and if not, how fast can we stop? Practically that means building one artefact and promoting it, ordering checks fastest-first, deploying to staging the same way you deploy to production, and treating rollback as a rehearsed routine rather than an emergency.

Because then you tested a different artefact than you shipped, and every test result downstream is evidence about something that no longer exists. Build once, promote that exact artefact, and let configuration vary between environments instead.

Fast enough that you'll do it often. The number matters less than the behaviour it produces — a four-minute deploy gets run many times a day, which keeps changes small, and small changes fail small. A one-hour deploy gets batched, and batches are what break production.

Only where the approver can actually assess what they're approving. A human clicking approve on a change they can't evaluate isn't a control — it's blame distribution. Real confidence comes from the checks before it and the rollback after it.

Infrastructure. A pipeline deploying to environments that drift is a faster way to be surprised. Make the environments reproducible, then the pipeline is worth building.

Make releases boring

Pipelines that answer whether a change is safe — and let you stop when it isn't.


Want a second set of eyes on your infrastructure?

If this raised questions about your own setup, our Australian team can review it and show you where to cut risk, cost, or downtime.