CI/CD Pipeline Best Practices (Part 5): Measure, Operate and Improve the Delivery System
Use modern DORA metrics, deployment history, recovery drills and value-stream thinking to improve CI/CD continuously without turning engineering into a dashboard game.

A CI/CD pipeline is never really finished.
The repository changes. The team changes. Test suites grow. New environments appear. A release process that felt fast with four developers starts queueing with twenty. A manual approval that once protected a genuinely risky migration becomes an automatic click everybody performs without thinking. A rollback path exists on paper but has not been exercised since the application had one database and no background workers.
That is why the final part of this series is not about another YAML trick.
It is about operating the delivery system as a system: measuring whether it is helping, understanding where work gets stuck, learning from failures, and improving it without turning engineering into a competition over dashboard numbers.
The pipeline is a product used by developers
It helps to think of CI/CD as an internal product.
Its users are developers, release engineers, operations teams and sometimes security or compliance teams. Those users need it to answer a very practical question:
Can I move this change from source control to production safely, quickly and predictably?
A pipeline that technically completes but routinely wastes an hour of developer time is not healthy.
A pipeline that is extremely fast but causes frequent production incidents is not healthy either.
A good delivery system balances:
Speed
+
Reliability
+
Recoverability
+
Understandability
+
Security
Optimising one while ignoring the others usually creates a local improvement and a global regression.
1. Use delivery metrics to understand outcomes, not to rank developers
DORA’s software-delivery research has become the most widely referenced framework for measuring delivery performance.
As of 2026, DORA uses five software-delivery performance metrics, grouped into throughput and instability.
Throughput
Change lead time — how long it takes a change to move from commit to successful production deployment.
Deployment frequency — how often the application is deployed or released.
Failed deployment recovery time — how long it takes to recover after a deployment causes degraded service and needs intervention.
Instability
Change fail rate — the proportion of deployments that require immediate remediation such as rollback, hotfix or fix-forward.
Deployment rework rate — the proportion of deployments that were unplanned and performed to fix a user-facing production problem.
That fifth measure, deployment rework rate, is important because older articles still describe DORA as “the four key metrics”. The model evolved.
The purpose of these metrics is not to create a leaderboard of teams or individuals.
They are signals about the delivery system.
2. Measure one service in context
DORA explicitly recommends applying these metrics in the context of a particular application or service.
That matters because comparing unlike systems can become meaningless.
A marketing site deployed 30 times per day and a regulated financial transaction platform deployed twice per week may both have appropriate delivery patterns for their risk and architecture.
Do not declare one team “high performing” because its deployment count is larger.
Ask instead:
- Is this service getting changes to users as quickly as its context reasonably allows?
- Are releases becoming safer or more fragile?
- Is recovery improving?
- Is unplanned rework consuming more of the team’s capacity?
Metrics are most valuable as trends.
3. Change lead time tells you where work waits
Imagine a change takes six days from commit to production.
The pipeline itself runs for only 18 minutes.
Where did the other five days and 23 hours go?
Perhaps:
Commit
│ 2 hours waiting for review
▼
Approved
│ 1 day waiting for test environment
▼
Validated
│ 3 days waiting for release window
▼
Production
Making CI two minutes faster will not materially improve delivery.
Lead time is useful because it forces you to look beyond workflow execution time at the entire path from committed change to production.
Common constraints include:
- slow review turnaround;
- long-lived branches;
- manual test queues;
- shared staging environments;
- release-window batching;
- dependency on another team;
- security reviews performed only at the end;
- manual change-ticket processes;
- unreliable automation that causes reruns.
The slowest part of delivery may not be in the CI system at all.
4. Deployment frequency is not a target by itself
Teams sometimes hear “elite teams deploy many times per day” and immediately set a deployment-frequency target.
That misses the point.
Frequent deployment is useful because small changes are easier to understand, validate and recover from.
If increasing deployment frequency causes teams to split one coherent change into arbitrary pieces or flood production with meaningless version bumps, you have optimised the metric instead of the outcome.
The better question is:
What prevents us from releasing a small valuable change when it is ready?
If the answer is “our release process is so painful that we batch a month of work into one weekend deployment”, that is a real improvement opportunity.
5. Change fail rate exposes release quality
A deployment can be fast and still be bad.
Change fail rate asks how often production changes need immediate remediation.
Suppose a team deploys 100 times in a month and eight releases require rollback or emergency fixes.
Conceptually:
Change fail rate = failed deployments / total deployments
= 8 / 100
= 8%
The exact definition should be agreed locally so that measurement remains consistent.
For example, does a cosmetic typo fixed in the next normal release count? Probably not if no immediate intervention was required.
Does a feature flag that has to be disabled because checkout fails count? Yes — the release required remediation.
The value is in observing whether instability rises or falls as the delivery system changes.
6. Failed deployment recovery time is about capability, not heroics
A team can have a low incident rate and still have poor recoverability.
If a bad release occurs only twice per year but each one takes six hours to reverse, the recovery system needs work.
Recovery depends on more than rollback scripts.
It includes:
- detecting that the release is unhealthy;
- identifying the affected version;
- deciding whether to roll back, roll forward or disable a feature;
- executing the recovery safely;
- dealing with database changes;
- draining or replaying queues;
- restoring compatible configuration;
- verifying that service is healthy afterwards.
The recovery clock often starts long before somebody presses the rollback button.
That is why observability and release metadata matter so much.
7. Deployment rework rate reveals hidden delivery cost
This is the newer DORA metric many older CI/CD guides do not mention.
Deployment rework rate measures unplanned deployments that exist to fix user-facing production defects.
Why is this useful?
Because a team can look busy and fast while spending a large amount of delivery capacity repairing yesterday’s releases.
Imagine 40 deployments in a month:
28 planned product changes
12 emergency/bug-fix deployments
The raw deployment frequency looks high.
But 30% of those deployments are rework.
That suggests a different engineering problem from a team making 40 planned, stable releases.
8. Speed and stability are not opposing goals
One of the most useful findings from DORA’s research is that speed and stability are not necessarily a trade-off.
Teams do not have to choose between:
FAST but dangerous
and
SAFE but painfully slow
Many of the practices that increase throughput also reduce risk:
- smaller changes;
- fast automated tests;
- reliable deployment automation;
- trunk-based development;
- build-once artifact promotion;
- good observability;
- rehearsed recovery.
A three-line change deployed through a trustworthy system is usually easier to validate and recover than 600 unrelated changes released in a quarterly batch.
9. Map the value stream when the bottleneck is unclear
When delivery feels slow but nobody agrees why, draw the process.
Not the idealised process in the architecture diagram. The real one.
For example:
Developer finishes change
│
├── 3h waiting for reviewer
▼
PR approved
│
├── 15m CI
▼
Merge
│
├── 5h waiting for shared staging slot
▼
Staging
│
├── overnight manual QA
▼
Release ready
│
├── waits until Thursday release window
▼
Production
Then separate:
active time — somebody or something is actually working on the change.
waiting time — the change is sitting still.
It is common to discover that a 15-minute pipeline sits inside a five-day delivery process.
Value-stream mapping turns vague frustration into identifiable constraints.
10. Instrument deployments as first-class events
Your observability system should know when a deployment happened.
A graph of error rate becomes much more useful when it also shows:
14:03 deploy v2.14.7
Release metadata should ideally let you connect:
Production symptom
│
▼
Deployment
│
▼
Artifact
│
▼
Build
│
▼
Commit / PR
GitHub environments, for example, maintain deployment history for jobs that reference those environments. Other CI/CD platforms provide equivalent release records.
Do not make your incident responders correlate timestamps manually across four systems if the pipeline can publish the information automatically.
Add an external post-release signal
Your telemetry sees the application from inside. A SiteTidy audit can complement it with an outside-in check of the public site's performance, SEO, TLS, headers and technical behaviour after deployment.
11. Define a release health window
A pipeline often declares success the moment the deployment command exits with code zero.
That is too early.
A release should have a health window in which the system observes meaningful signals.
For example:
Deploy
│
▼
Readiness checks
│
▼
Smoke transaction
│
▼
10-minute initial observation
│
▼
Progressive rollout
│
▼
Extended bake time
│
▼
Release considered stable
The window depends on the workload.
A high-volume API may generate enough evidence in minutes. A payroll workflow that runs twice a day may require a very different release-validation strategy.
12. Practice recovery before production chooses the timing
A rollback plan that has never been exercised is a hypothesis.
Schedule recovery drills appropriate to the system’s risk.
You might rehearse:
- redeploying the previous artifact;
- disabling a feature flag;
- shifting traffic back from green to blue;
- restoring a compatible configuration version;
- recovering from a failed migration;
- rebuilding a production environment from Infrastructure as Code;
- rotating a compromised deployment credential.
The purpose is not chaos for entertainment.
It is to discover missing assumptions while the incident is simulated rather than real.
13. Database recovery needs its own plan
Application rollback is often straightforward compared with data rollback.
Suppose version 8 starts writing a new data representation. Five minutes later you roll the application back to version 7.
Can version 7 read the data version 8 already wrote?
If not, your “one-click rollback” is fictional.
This is why earlier parts of this series emphasised backward-compatible, expand-and-contract database changes.
Recovery should consider:
- schema compatibility;
- destructive migrations;
- irreversible data transformations;
- queued messages generated by the new version;
- side effects sent to external services.
A database backup is valuable, but restoring a large production database to a point in time may not be an acceptable first-line rollback mechanism for a small application defect.
14. Use post-incident reviews to improve the pipeline
When a release causes an incident, do more than fix the application bug.
Ask:
- Why did the defect reach production?
- Which test or check could realistically have caught it?
- Why did the rollout expose so many users before detection?
- Why did detection take as long as it did?
- Why did recovery take as long as it did?
- Was the deployment metadata sufficient?
- Was the runbook correct?
- Did the pipeline make recovery easier or harder?
Then improve the system.
If an incident reveals that a critical background worker has no smoke test, add one.
If rollback failed because migrations were destructive, change the migration pattern.
If nobody knew which artifact was deployed, improve release metadata.
The pipeline should absorb lessons from failures.
15. Do not punish teams with the metrics
The quickest way to destroy a useful engineering metric is to turn it into an individual performance target.
Tell developers they are evaluated on number of deployments and they will increase deployments.
Tell teams their bonus depends on change fail rate and suddenly fewer incidents will meet the local definition of “deployment failure”.
Metrics become gameable when they are targets rather than diagnostic tools.
Use them to ask questions:
- Why did lead time double this quarter?
- Why are emergency deployments increasing?
- Why does this service recover much more slowly than it used to?
Do not use them to ask:
- Which developer deployed the least?
16. Add local metrics around the constraint
DORA metrics describe outcomes. They do not tell you exactly which lever to pull.
Once a bottleneck is identified, add more specific temporary or operational metrics.
If review is slow:
PR time-to-first-review
PR time-to-approval
If CI is slow:
queue time
p50/p95 workflow duration
flaky retry rate
cache hit rate
If production recovery is slow:
time to detect
time to identify bad release
time to execute rollback
time to verify recovery
Improve the constraint, then reconsider whether you still need all of those metrics.
17. Keep manual gates only where they add a real decision
Manual approval tends to accumulate.
A deployment once failed, so somebody added approval. An auditor asked a question, so another approval appeared. A manager wanted visibility, so production now waits for a third click.
Periodically ask what each gate protects.
A useful gate may represent:
- business acceptance of a high-impact release;
- separation of duties;
- regulatory approval;
- confirmation that an external dependency is ready;
- a deliberate go/no-go decision for a risky migration.
A weak gate is one where the approver has no new evidence and always clicks approve.
Automate evidence. Preserve human judgement where it is genuinely judgement.
18. Watch for delivery-system drift
CI/CD drift is not only infrastructure drift.
The process itself drifts.
Examples:
- pipelines become progressively slower;
- bypass permissions accumulate;
- old secrets remain after OIDC is introduced;
- deprecated actions stay pinned forever;
- feature flags are never removed;
- temporary manual release steps become permanent;
- staging stops resembling production;
- runbooks reference commands that no longer work.
Schedule lightweight reviews of the delivery system just as you review production architecture.
Not every week. Often enough that decay does not become invisible.
19. Make ownership explicit
Who owns the pipeline?
If the answer is “everyone”, the practical answer may be “nobody”.
Ownership does not mean one platform engineer must approve every YAML change.
It means somebody is accountable for things such as:
- runner health;
- reusable workflow maintenance;
- pipeline security updates;
- flaky test policy;
- release tooling;
- deployment documentation;
- delivery metrics;
- removing obsolete controls.
Application teams should still own the deployability of their services. A platform team can provide paved roads, but it should not become a distant ticket queue that owns production on behalf of developers.
20. Improve one constraint at a time
A common CI/CD transformation mistake is trying to fix everything simultaneously.
New branching model. New build platform. New container registry. New test framework. New deployment strategy. New secrets manager. New observability stack.
Now every failure has six possible causes.
A better improvement loop is:
Measure
│
▼
Identify biggest constraint
│
▼
Change one meaningful capability
│
▼
Observe outcome
│
▼
Keep / adjust / revert
│
└───────────────↺
That is continuous improvement applied to continuous delivery.
Run the “Friday afternoon” test
Would a normal, low-risk change be safe to deploy at 4pm on Friday without assembling a war room? If the answer is no, identify exactly what you do not trust: testing, rollout, observability, rollback, ownership or the process itself. That answer is your improvement backlog.
Browse SiteTidy's developer toolsA practical monthly delivery review
You do not need an enterprise DevOps committee.
For a product team, a useful monthly review might take 30–45 minutes:
- Look at the five DORA delivery metrics for the service.
- Review major pipeline slowdowns or flaky-test trends.
- Review production incidents linked to deployments.
- Check whether recovery/runbooks failed anywhere.
- Identify the single biggest delivery constraint.
- Agree one concrete improvement and an owner.
- Remove one obsolete workaround, flag, secret or manual step if possible.
The output should be engineering work, not a slide deck.
The complete CI/CD model from this series
Across all five parts, the delivery system we have built up looks like this:
Small reviewed change
│
▼
Fast trustworthy CI
│
├── deterministic dependencies
├── reliable tests
├── least privilege
└── supply-chain controls
│
▼
One immutable release artifact
│
├── traceable identity
└── provenance / attestation where justified
│
▼
Staging validation
│
▼
Protected production deployment
│
├── environment boundary
├── short-lived identity
├── concurrency control
└── approval only where meaningful
│
▼
Progressive release
│
├── health criteria
├── bake time
└── feature exposure / traffic ramp
│
▼
Production observation
│
├── deployment metadata
├── service telemetry
└── rapid recovery path
│
▼
Measure and improve
There is nothing exotic about that model.
The difficult part is making every stage dependable enough that the team trusts the whole path.
Final thought
The most mature CI/CD system is not the one with the most stages, the most scanners or the cleverest YAML.
It is the one that lets a team make small changes, receive fast evidence, release with controlled risk, detect failure quickly, recover predictably and learn from what happened.
If your pipeline does that, the metrics tend to improve as a consequence.
If it does not, the metrics tell you where to look next.
That is a much healthier objective than chasing an arbitrary deployment count or trying to make every graph point up and to the right.
