CICD-171 · Read deployment conditions after failure
Encyclopedia · Deployment and rollback · All snippets
Previous · CICD-170 · Next · CICD-172
1. Where it fits
- Placement Bash run step following checkout, or equivalent lab terminal.
- Prerequisites protected staging environment and trusted immutable release artifacts.
- Platforms kubernetes, local-lab.
2. Copy the snippet
bash
kubectl -n staging get deploy web -o json | jq '.status.conditions'3. How it works
The expression filters or transforms the input JSON. Where jq -e is used, a false or empty result can fail the gate.
4. Verify the result
Distinguish temporary progress from ProgressDeadlineExceeded.
Validation syntax-validated (Bash parse). Status definitions.