Postdeploy verification & rollback
Recover from a failed smoke check
Lesson 17 of 20 · 12 min · Module 6: Verify and recover
A successful deployment command is not the same as a healthy release.
Start this lesson →Free. No installation: you write and run the code in your browser, and it is checked automatically.
By the end, you’ll be able to…
- Verify user-visible behavior after deployment
- Prepare a known-good recovery target
The idea
A workflow combines an event boundary, job dependencies, and ordered steps. Conditions and prerequisite outcomes determine which jobs can run.
rollback:
needs: verify
if: failure()
runs-on: ubuntu-latest
steps:
- run: lab rollback notes:1.0
01Verify user-visible behavior after deployment
A smoke check asks whether a small critical operation still works after a change. A deployment tool exit code alone cannot answer that.
02Prepare a known-good recovery target
Rollback should use an identified earlier release. Guessing what latest meant before the incident delays recovery and can deploy the wrong content.
03Trigger recovery from the failure evidence
failure() makes rollback eligible after its failed prerequisite. The lab records the image change without touching a real environment.
Your turn
What the checks look for
- Observes the failed smoke job
- Runs recovery after that failure
- Returns to the known-good release
Take this with you
Design verification and recovery as part of delivery, before an incident.
Go a little further
Explain how a backwards-compatible database change can make rollback safer.