The direct recommendation: Build one immutable artifact for a commit, test it, record its digest, and promote that exact artifact through environments. Authenticate deployment jobs with constrained OIDC and put production behind environment protections.
This article does not declare one provider universally best or invent a capacity or cost number. It gives you a reviewable method and requires measurement against the real workload. Primary sources were checked on 2026-08-28. Google Cloud comparisons are explicitly research-based, not presented as first-hand operating experience.
The decision in one minute
- CI creates the artifact and evidence. CD deploys the identified artifact; it must not silently rebuild from moving dependencies.
- Pin actions and dependencies, minimize GITHUB_TOKEN permissions, and prevent untrusted pull-request code from reaching deployment credentials.
- Bind cloud trust to repository, branch or protected environment claims instead of trusting every token from an organization.
- Run backward-compatible migrations before traffic when possible, and defer destructive cleanup until old code is gone.
- Define rollback as an executable artifact and data decision, not a sentence in a runbook.
If the team cannot answer these points, the missing component is not another cloud service. The operating contract is incomplete. Write the assumptions, separate sourced facts from calculations, and identify what will be measured before purchase or release.
Reusable artifact
| Area | Decision |
|---|---|
| Build | commit SHA -> artifact digest |
| Verify | unit, integration, scan, provenance |
| Stage | deploy same digest, smoke and migration checks |
| Approve | protected environment and independent reviewer |
| Produce | same digest, canary, health gate |
| Recover | previous digest plus data-compatible rollback |
Put this matrix in the architecture decision or implementation ticket. Any row without an owner or acceptance evidence is deferred risk.
How to use the artifact
1. Build
The proposed decision is: commit SHA -> artifact digest. Do not copy that value without context. Record its input source, environment, owner, and review date. Turn it into a repeatable check before and after release, including the wrong state the system must reject. Reopen the decision when data shape, region, traffic pattern, or ownership changes instead of assuming the previous setting remains safe.
2. Verify
The proposed decision is: unit, integration, scan, provenance. Do not copy that value without context. Record its input source, environment, owner, and review date. Turn it into a repeatable check before and after release, including the wrong state the system must reject. Reopen the decision when data shape, region, traffic pattern, or ownership changes instead of assuming the previous setting remains safe.
3. Stage
The proposed decision is: deploy same digest, smoke and migration checks. Do not copy that value without context. Record its input source, environment, owner, and review date. Turn it into a repeatable check before and after release, including the wrong state the system must reject. Reopen the decision when data shape, region, traffic pattern, or ownership changes instead of assuming the previous setting remains safe.
4. Approve
The proposed decision is: protected environment and independent reviewer. Do not copy that value without context. Record its input source, environment, owner, and review date. Turn it into a repeatable check before and after release, including the wrong state the system must reject. Reopen the decision when data shape, region, traffic pattern, or ownership changes instead of assuming the previous setting remains safe.
5. Produce
The proposed decision is: same digest, canary, health gate. Do not copy that value without context. Record its input source, environment, owner, and review date. Turn it into a repeatable check before and after release, including the wrong state the system must reject. Reopen the decision when data shape, region, traffic pattern, or ownership changes instead of assuming the previous setting remains safe.
6. Recover
The proposed decision is: previous digest plus data-compatible rollback. Do not copy that value without context. Record its input source, environment, owner, and review date. Turn it into a repeatable check before and after release, including the wrong state the system must reject. Reopen the decision when data shape, region, traffic pattern, or ownership changes instead of assuming the previous setting remains safe.
Implementation sequence
- CI creates the artifact and evidence. CD deploys the identified artifact; it must not silently rebuild from moving dependencies. Start in a non-production environment and make step 1 produce a reviewable configuration, artifact, or metric.
- Pin actions and dependencies, minimize GITHUB_TOKEN permissions, and prevent untrusted pull-request code from reaching deployment credentials. Start in a non-production environment and make step 2 produce a reviewable configuration, artifact, or metric.
- Bind cloud trust to repository, branch or protected environment claims instead of trusting every token from an organization. Start in a non-production environment and make step 3 produce a reviewable configuration, artifact, or metric.
- Run backward-compatible migrations before traffic when possible, and defer destructive cleanup until old code is gone. Start in a non-production environment and make step 4 produce a reviewable configuration, artifact, or metric.
- Define rollback as an executable artifact and data decision, not a sentence in a runbook. Start in a non-production environment and make step 5 produce a reviewable configuration, artifact, or metric.
Do not copy configuration between environments by hand. Version the policy, infrastructure, and release path where the service allows it, and keep production secrets out of the build. Another operator should be able to reproduce the path from the repository and runbook without hidden knowledge.
The DevOps and developer handoff contract
Handoff begins with an executable request: which commit or digest, which non-secret variables, which secret names and owners without copying values into the ticket, which health check, which migration, and what behavior is acceptable when a dependency fails? The developer supplies a local or test-environment run path, a safe configuration example, critical-journey tests, and the change’s data and backward-compatibility impact.
DevOps returns the environment address, permission boundary, log and dashboard locations, retention period, and deploy and rollback paths. Before approval, both sides name the release observer, decision window, and statistical threshold that aborts a canary or restores the previous artifact. After deployment, a message saying “done” is insufficient. Attach the deployed digest, timestamp, smoke result, public route, migration state, and any accepted deviation with a follow-up ticket. This contract prevents configuration failure from becoming an unowned gap between teams.
Verification command or configuration
permissions:
contents: read
id-token: write
jobs:
deploy:
environment: production
steps:
- uses: actions/download-artifact@v5
with:
name: app-${{ github.sha }}
- run: sha256sum --check artifact.sha256
- run: ./deploy-and-smoke-test.sh
Failure modes to design tests around
Rebuilding production after staging passed, producing different dependency bytes.
Do not approve this decision until an owner, environment, and pass threshold are named. Record the configuration, artifact digest, or log query that proves it, then add a deliberate failure test showing that the control rejects the wrong state. This turns advice into an operating contract shared by developers, DevOps, and security reviewers.
Giving the build job cloud administrator credentials even though only the deploy job needs access.
Do not approve this decision until an owner, environment, and pass threshold are named. Record the configuration, artifact digest, or log query that proves it, then add a deliberate failure test showing that the control rejects the wrong state. This turns advice into an operating contract shared by developers, DevOps, and security reviewers.
Uploading an artifact without a digest, retention policy, or provenance link.
Do not approve this decision until an owner, environment, and pass threshold are named. Record the configuration, artifact digest, or log query that proves it, then add a deliberate failure test showing that the control rejects the wrong state. This turns advice into an operating contract shared by developers, DevOps, and security reviewers.
Rolling application code back after an irreversible schema change.
Do not approve this decision until an owner, environment, and pass threshold are named. Record the configuration, artifact digest, or log query that proves it, then add a deliberate failure test showing that the control rejects the wrong state. This turns advice into an operating contract shared by developers, DevOps, and security reviewers.
Testing and release gates
Build a small matrix that links every risk to a test, owner, and evidence. Test the happy path, then test the expected denial or failure. Keep source success separate from build success, provider deployment separate from public-route response, and add data integrity and queue age to health checks for stateful systems.
Run deterministic checks in CI, environment and migration checks in CD, then verify the critical journey at the real deployed URL. Define an automatic abort threshold for error rate, p95 latency, or dependency failure. Retain the previous artifact and a data-recovery procedure. Success is readable evidence, not a green indicator by itself.
Cost without a marketing number
Model compute, storage, requests, transfer, logs, backups, keys, support, failure headroom, and engineering time. Use the actual region’s price on the decision date, then enable budget and anomaly alerts. A saving that removes failure capacity or extends the recovery objective needs explicit approval.
The safest optimization is deleting an unneeded resource or measurably reducing origin work. Reservations and long commitments come after the workload stabilizes. Give every line item a unit, review owner, and action when it crosses its threshold.
Field note from operations
The reusable lesson is that repository source, built artifact, provider state, browser response, and data integrity are different evidence states. Incidents often last longer because one green step is treated as proof that the whole chain succeeded. Capture timestamp, identity, route, and effective configuration before widening access or changing several layers at once.
This is an anonymized operating lesson, not a client outcome or benchmark. Its practical value is the procedure: change one reversible thing, watch the expected signal, and update the timeline.
Practical next steps
- Copy the artifact above and fill it with system inputs and owners, not a sales forecast.
- Select the two riskiest assumptions and run a failure and recovery test in non-production.
- Record the decision, alternatives, cost model, acceptance evidence, and review date.
- Continue through the DevOps and cloud series according to the next gap in your operating model.
If you need an evidence-led architecture or delivery review, start with a small scope through the web and application development service that names the risks and proof before a larger commitment.
Continue the series
- Previous: Not Every Odoo App Scales the Same: Workers, PostgreSQL, Files, and Jobs
- Next: What Belongs in CI and What Belongs in CD?
- Related library article: A practical companion to this decision
Use these links as a learning path, but validate every decision against the actual system.
Sources and review date
- GitHub Actions deployment environments
- GitHub Actions OpenID Connect reference
- GitHub Actions secure use reference
- GitHub artifact attestations
- AWS CI/CD litmus test
- Google Cloud Deploy terminology
Last reviewed: 2026-08-28. Recheck pricing, quotas, and regional feature availability immediately before implementation.