From f1032865f38f854deafe3a74b2dae8a90139ee20 Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 12 May 2026 09:24:23 +0200 Subject: [PATCH] fix(ci): guard against empty HOST_IP in smoke test If `ip route show default` returns no output the old code passed an empty string to curl --resolve, producing a confusing error 6 ("couldn't resolve host") with no indication that gateway detection had failed. The new guard exits immediately with a clear message. Addresses review concern raised by Tobias Wendt. Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/nightly.yml | 1 + .gitea/workflows/release.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitea/workflows/nightly.yml b/.gitea/workflows/nightly.yml index a16a0797..5e57c6e4 100644 --- a/.gitea/workflows/nightly.yml +++ b/.gitea/workflows/nightly.yml @@ -170,6 +170,7 @@ jobs: HOST="staging.raddatz.cloud" URL="https://$HOST" HOST_IP=$(ip route show default | awk '/default/ {print $3}') + [ -n "$HOST_IP" ] || { echo "ERROR: could not detect Docker bridge gateway via 'ip route'"; exit 1; } RESOLVE="--resolve $HOST:443:$HOST_IP" echo "Smoke test: $URL (pinned to $HOST_IP via bridge gateway)" curl -fsS $RESOLVE --max-time 10 "$URL/login" -o /dev/null diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 4dafb0e3..714dc864 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -114,6 +114,7 @@ jobs: HOST="archiv.raddatz.cloud" URL="https://$HOST" HOST_IP=$(ip route show default | awk '/default/ {print $3}') + [ -n "$HOST_IP" ] || { echo "ERROR: could not detect Docker bridge gateway via 'ip route'"; exit 1; } RESOLVE="--resolve $HOST:443:$HOST_IP" echo "Smoke test: $URL (pinned to $HOST_IP via bridge gateway)" curl -fsS $RESOLVE --max-time 10 "$URL/login" -o /dev/null