Delivery Gates, Environments and Rollback

MODULE 20 · LESSON 20.2

Promote a verified artifact across environments with approvals and a recovery path.

Practice-firstBeginner-friendlyProduction-aware

The production problem this solves

Good work on Delivery Gates, Environments and Rollback leaves evidence: a visible behavior, a stable contract or a repeatable operational check. This lesson controls how a working change survives machines, environments, traffic and failure after it leaves a developer laptop.

Here, that decision supports a specific checkpoint: Create a protected GitHub Actions pipeline for CourseFlow. A reviewable result should include a command transcript, CI result, deployment check and rollback note rather than a claim that the feature simply works.

Delivery Gates, Environments and Rollback workflowA four-step visual showing build once, environment protection, database migrations, rollback.Delivery Gates, Environments and Rollback workflow1Build Once2EnvironmentProtection3DatabaseMigrations4Rollback

Delivery Gates, Environments and Rollback workflow

  1. 1Build Once
  2. 2Environment Protection
  3. 3Database Migrations
  4. 4Rollback
Delivery Gates, Environments and Rollback workflow: a practical sequence used in this lesson.

A practical model for delivery gates, environments and rollback

Promote a verified artifact across environments with approvals and a recovery path. The useful unit of understanding is the boundary: who owns the decision, which input crosses it, what result is visible and how a failure is reported.

  • Build Once: Decide what belongs in code, configuration, data or documentation and explain why.
  • Environment Protection: Name its input, observable result and most likely failure in this lesson.
  • Database Migrations: Locate this responsibility in CourseFlow and defend the boundary you chose.
  • Rollback: Implement one behavior that another learner can reproduce without reading your mind.

Explain each moving part

The sample is intentionally narrow. Its job is to expose build once without hiding the decision behind unrelated setup.

TEXT
commit -> CI -> immutable image -> staging checks -> production approval -> health check -> rollback if needed
Review it as someone else's change

Explain what the sample proves, what it does not prove, and which test would increase your confidence in environment protection.

Trace the implementation boundary

  1. 1
    Build Once

    Run the focused example and save the output, trace, query or screenshot that confirms the result.

  2. 2
    Environment Protection

    Break one assumption on purpose, make recovery clear and record the trade-off you accepted.

  3. 3
    Database Migrations

    Name the caller and the owner of this behavior before changing the implementation.

  4. 4
    Rollback

    Compare expected and actual output before editing; the difference tells you where to investigate.

Mistakes that create hidden coupling

  • Treating build once as vocabulary instead of defining the behavior it must produce.
  • Testing the expected path while ignoring an empty, invalid, repeated or unauthorized case around environment protection.
  • Allowing database migrations to cross a boundary without an explicit contract or useful error.
  • Changing several layers before capturing the first piece of evidence, which makes the original cause harder to see.

Debug from the boundary inward

  1. Reduce the problem to the smallest failing Delivery Gates, Environments and Rollback case.
  2. Capture the actual input and output at the build once boundary.
  3. Read the first relevant error, request, trace or query rather than the loudest downstream symptom.
  4. Test one explanation for the failure in environment protection; avoid changing two variables together.
  5. Keep a regression check that would expose the same defect if it returned.

Security decision

Use least privilege, protected secrets, reviewed dependencies and reversible changes. A deployment shortcut must never weaken the application boundary.

Performance decision

Establish a baseline, observe resource use and latency, and keep a rollback signal. Capacity changes without measurement are guesses.

PRACTICE

Build something you can inspect

Document deployment gates, migration order and rollback criteria for CourseFlow.

Stretch challenge

Ask another person to run the exercise from your README. Fix the first place where their result differs from yours.

Definition of done

  • The behavior around build once works with realistic input.
  • A failure involving environment protection is handled clearly and without leaking sensitive detail.
  • The implementation remains keyboard-usable when it produces an interface.
  • Your evidence directly supports the claim made in the exercise.
  • The README records the important trade-off without pretending the solution is universal.

Check your reasoning

Why is rebuilding a different artifact for production weaker than promoting the tested artifact?

Answer by naming the expected build once behavior, the layer responsible for it and the evidence that would confirm your explanation.

Where would you investigate the first failure?

Start where environment protection crosses a boundary. Compare the actual input and output there before following downstream symptoms.

What would make this work reviewable?

Show the focused change, repeatable steps, the result of your check and one honest trade-off connected to database migrations.

What to carry into the next lesson

  • Promote a verified artifact across environments with approvals and a recovery path.
  • Keep build once visible at the boundary where it can be tested.
  • Use evidence from environment protection before widening the implementation.

References and related reading

Progress is stored only in this browser.

Share this page

Share this page with the people who will use it next.

X Facebook LinkedIn WhatsApp Email

Discussion

No comments yet. Add the first useful question or observation.