Skip to content

CICD-195 · Print DNS timing and status ​

Encyclopedia · CI diagnostics and evidence · All snippets

Previous · CICD-194 · Next · CICD-196

1. Where it fits ​

  • Placement Bash run step following checkout, or equivalent lab terminal.
  • Prerequisites authorized fixture run and sanitized evidence location.
  • Platforms local-linux, github-actions, gitea-actions.
  • Parameters HEALTH_URL.

2. Copy the snippet ​

bash
curl -fsS -o /dev/null --max-time 8 -w 'http=%{http_code} dns=%{time_namelookup}\n' "${HEALTH_URL:?}"

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.

4. Verify the result ​

Use an approved endpoint. A timeout should fail rather than print a plausible success status.

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