A release is a traceable artifact and a reversible decision
Continuous integration checks changes as they merge. Continuous delivery keeps a tested release ready for deployment; continuous deployment automatically promotes qualifying changes. Tests reduce risk but do not prove every production behavior correct.
CI/CD Pipeline Flow
Build once, identify precisely
A useful pipeline records the source revision, dependency lockfile, build environment and artifact digest. Promote the same artifact through testing and production. A mutable tag such as stable can point to a different image later; record the digest that was actually tested.
Separate stages also need explicit file transfer. In a hosted workflow, a new job does not automatically inherit a previous job’s checkout, binaries, container login or cluster credentials. Use a registry or artifact service and verify what the deployment stage consumes.
Worked release: add a profile field
Suppose version A reads name, while version B should use display_name. Renaming the database column before the rollout makes A fail, including any A instance retained for rollback.
Use an expand-and-contract sequence:
- Add the new nullable field while A remains compatible.
- Deploy code that tolerates either field and defines how concurrent updates are copied.
- Backfill in bounded batches; verify missing or conflicting rows.
- Move readers to the new field and observe production behavior.
- Remove the old path only after the rollback window closes and all consumers have migrated.
A traffic rollback restores application code, not the previous database state. If B wrote an incompatible event, switching back to A cannot make that event understandable. Test mixed-version readers, not just a clean installation.
Choose the rollout for the failure cost
| Strategy | What changes | Failure to investigate |
|---|---|---|
| Blue-green | Traffic moves between prepared environments | New writes may prevent a safe switch back |
| Canary | A limited cohort reaches the new version | The cohort may miss rare workloads |
| Rolling | Old and new instances coexist | Mixed versions must share schemas and protocols |
| Feature flag | A code path becomes active | Hidden code may still execute side effects |
Kubernetes Deployments document rolling-update controls such as surge and unavailable replicas. Extra surge capacity is real resource usage; rolling updates are not automatically free of overhead or downtime.
Make checks answer a failure question
A syntax or type check finds malformed code. A migration test checks compatibility with existing records. A request-level test checks the published artifact’s actual response. A rollback rehearsal verifies that the previous artifact can still serve current data. Give each check an owner and a failure action.
For a hypothetical 1% canary, an error rate of 2/20 requests is too little evidence to compare confidently with a stable fleet serving thousands. Set an observation period and sample requirement, and inspect important endpoints separately. Stop on correctness failures even when an aggregate metric looks acceptable.
Protect deployment authority
Keep build jobs from receiving production privileges they do not need. Separate untrusted contribution checks from jobs that can publish artifacts or modify infrastructure. Use narrowly scoped credentials, pin third-party actions to reviewed revisions and avoid printing secrets. See GitHub’s secrets guidance for workflow-specific handling.
A release record you can use
Record the artifact digest, approved migration sequence, traffic switch time, observation window and rollback limitations. During an incident, these facts let you answer whether reverting is safe. “All tests passed” alone does not explain what changed or which state can be recovered.
Read blue-green deployment for a cutover example and distributed tracing for tracing a failing request across services.
Keep reading
Blue-Green Deployment: Traffic Switching and State Compatibility
Plan a two-environment release with capacity headroom, connection draining, compatible schema changes and a testable rollback window.
Docker Internals
What actually is a container? Just a Linux process with a mask on. Deep dive into Namespaces, Cgroups, and Union Filesystems (OverlayFS).
Kubernetes Architecture Explained
Under the hood of K8s: The Control Plane (API Server, Scheduler, Etcd, Controllers) and Data Plane (Kubelet, Kube-proxy, Container Runtime).
The Observability Stack
Moving beyond simple monitoring. How to build a full observability stack using the Three Pillars: Logs, Metrics, and Distributed Tracing.
Distributed Tracing
Complete guide to tracking requests across microservices using distributed tracing, covering trace context propagation, span instrumentation, OpenTelemetry implementation, and production debugging with Jaeger, Zipkin, and Datadog APM.