Topic lessonTopic: CI/CD design: from checks to release and recovery
CI/CD release gates: match required checks, approvals and the deployed version
A release gate evaluates whether a particular candidate may be delivered to a particular environment. Match checks and approvals to their source revision, artifact and destination instead of relying on labels. Use fictional change B to identify mismatches that should stop a release.
Define required conditions, decision authority and target; prevent stale approvals or another artifact’s evidence from authorizing a release.
A revision identifies source, an artifact identifies delivered files, and a destination identifies the environment. G1 is a fictional release policy, not a change to live GitHub settings or this site’s authorization process.
Identify the subject of the decision first
Source B, artifact B and target prod.
Executed checks, provenance and conditions.
Matching approval and explicit exception rules.
Running version, configuration and user results.
Conceptual release responsibilities. Approval alone does not complete delivery or operational verification.
Code review evaluates the change, tests evaluate specified conditions, and a release gate evaluates the candidate and destination. Completed review does not authorize an old artifact. Separate automatically checkable conditions from decisions about requirements and impact.
G1: define conditions for releasing B to prod
| Condition | Required record |
|---|---|
| Subject | Source B, artifact B identity and destination prod. |
| Checks | Required tests executed for B; no unresolved mismatch, cancellation or omission. |
| Artifact | Fetched bytes match the record and expected provenance. |
| Impact | Configuration differences, DB compatibility, verification and recovery boundaries. |
| Decision | An authorized decision covering this B/prod candidate. |
| Exception | Separately defined authority, reason, scope and expiry for unmet requirements. |
G1 includes human judgment; that is not a universal requirement for identical staffing or steps on every change. Tailor release policy to impact. More names or approvals alone do not prevent target mismatches or omitted tests.
Stop when evidence belongs to another candidate
| Observation | G1 decision | Follow-up |
|---|---|---|
| Checks B, artifact B, decision B/prod | These identities match | Actual deployment and post-release verification remain separate. |
| Checks B, artifact A, decision B/prod | Stop | Match the selected artifact to B. |
| Checks B, artifact B, old decision A/prod | Stop | Evaluate B’s change and impact. |
| Checks B, artifact B, decision B/staging | Stop | Evaluate production configuration and impact. |
| Required test skipped; check treated as successful | Stop | Establish execution and outcome of the required test. |
Define revalidation when source, artifact, material settings or destination changes after approval. GitHub stale-review dismissal depends on configured protection rules. An old Approve remaining visible is not evidence that G1 authorizes the current candidate.
Because skipped jobs can be treated as successful, include required-test execution in the policy. Successful diagnostics or notification do not replace the candidate’s required checks.
Align written policy with enforced configuration
GitHub branch protections govern integration conditions; environment protections govern jobs referencing that environment. Required PR review alone does not establish that a deployment job is protected by the intended environment. Inspect both configuration and workflow references.
Availability is not enforcement. Plan and visibility affect features; required reviewers and similar protections on Free/Pro/Team are public-only. Check administrator bypass, self-review prevention and eligible branches/tags. Naming an environment does not prove protection is enforced.
After eligibility, verify what was actually deployed
- Identify revision, artifact and destination.
- Verify target, execution and expectations for required checks.
- Match provenance, retrieved bytes and needed privileges.
- Record impact evaluation and the applicable decision.
- Deploy to the specified target and verify running version, settings and user results.
- On anomalies, stop expansion and apply the defined application/data recovery policy.
If exceptions are allowed, do not relabel them as ordinary success. Record the unmet condition, authority, scope, expiry and compensating verification. Blanket emergency bypasses erase information needed for decisions and recovery. This lesson does not disable any live protections.
Check candidate and decision associations
Choose an option to see the result and explanation.
Check, then explain in your own words
- Explain G1 conditions and authority.
- Identify G2’s four stop conditions.
- Separate written rules from enforced configuration.
- Record eligibility, deployment and post-release verification separately.
Check your understanding: The same B zip changes destination from staging to prod. Reuse the decision unchanged?
G1 does not. Inspect production settings, privileges, data, impact and required authority; bind the decision to B/prod. Verify actual version and behavior after deployment.
The decision covers the environment and its conditions as well as files.
Sources and conditions checked
The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.
- GitHub: About protected branchesChecked:
Scope and conditionsPlan, visibility and configured checks, reviews and stale approval handling. Documentation review, not live-environment validation.
Used in this lessonStop when evidence belongs to another candidate Align written policy with enforced configuration
- GitHub: Status checksChecked:
Scope and conditionsA skipped job is treated as successful; distinguish executed-test evidence and a workflow that never starts. Documentation review, not live GitHub/AWS validation.
Used in this lessonStop when evidence belongs to another candidate
- GitHub: Managing environmentsChecked:
Scope and conditionsEnvironment protections and secret access; plan/visibility availability and administrator bypass configuration differ. Documentation review, not live GitHub/AWS validation.
Used in this lessonAlign written policy with enforced configuration