Skip to content

CICD-170 · Wait for a public health SLO probe ​

Encyclopedia · Deployment and rollback · All snippets

Previous · CICD-169 · Next · CICD-171

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.
  • Parameters HEALTH_URL.

2. Copy the snippet ​

bash
curl -fsS --connect-timeout 3 --max-time 5 --retry 10 --retry-connrefused "${HEALTH_URL:?}" | jq -e '.status=="ok"'

3. How it works ​

The request checks the selected HTTP interface. Timeouts limit waiting, and an explicit exit or payload condition determines pass and fail. 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 ​

Set a trusted URL and retain final response details if the probe fails.

Validation syntax-validated (Bash parse). Status definitions.