fix(ci): route smoke through Docker gateway (#1)
quality-gate / quality (push) Successful in 2m37s
quality-gate / container (push) Failing after 1m51s

This commit is contained in:
KyuubiYoru
2026-07-17 01:29:30 +02:00
parent 8d98d888b3
commit 1bca034a52
5 changed files with 17 additions and 6 deletions
+5 -2
View File
@@ -158,8 +158,11 @@ jobs:
port_suffix="$(( ${GITHUB_RUN_ID:-$$} % 10000 ))" port_suffix="$(( ${GITHUB_RUN_ID:-$$} % 10000 ))"
export RENDEZVOUS_HTTP_HOST_PORT="$(( 20000 + port_suffix ))" export RENDEZVOUS_HTTP_HOST_PORT="$(( 20000 + port_suffix ))"
export RENDEZVOUS_UDP_HOST_PORT="$(( 40000 + port_suffix ))" export RENDEZVOUS_UDP_HOST_PORT="$(( 40000 + port_suffix ))"
export RENDEZVOUS_SMOKE_HTTP_URL="http://127.0.0.1:${RENDEZVOUS_HTTP_HOST_PORT}/" export RENDEZVOUS_HTTP_BIND_ADDRESS="0.0.0.0"
export RENDEZVOUS_SMOKE_UDP_ENDPOINT="127.0.0.1:${RENDEZVOUS_UDP_HOST_PORT}" runner_host_gateway="$(docker inspect "$HOSTNAME" | jq -er \
'.[0].NetworkSettings.Networks | to_entries[0].value.Gateway')"
export RENDEZVOUS_SMOKE_HTTP_URL="http://${runner_host_gateway}:${RENDEZVOUS_HTTP_HOST_PORT}/"
export RENDEZVOUS_SMOKE_UDP_ENDPOINT="${runner_host_gateway}:${RENDEZVOUS_UDP_HOST_PORT}"
runner_workspace_source="$(docker inspect "$HOSTNAME" | jq -er \ runner_workspace_source="$(docker inspect "$HOSTNAME" | jq -er \
--arg destination "$GITHUB_WORKSPACE" \ --arg destination "$GITHUB_WORKSPACE" \
'.[0].Mounts[] | select(.Destination == $destination) | .Source')" '.[0].Mounts[] | select(.Destination == $destination) | .Source')"
+5 -2
View File
@@ -126,8 +126,11 @@ jobs:
port_suffix="$(( ${GITHUB_RUN_ID:-$$} % 10000 ))" port_suffix="$(( ${GITHUB_RUN_ID:-$$} % 10000 ))"
export RENDEZVOUS_HTTP_HOST_PORT="$(( 20000 + port_suffix ))" export RENDEZVOUS_HTTP_HOST_PORT="$(( 20000 + port_suffix ))"
export RENDEZVOUS_UDP_HOST_PORT="$(( 40000 + port_suffix ))" export RENDEZVOUS_UDP_HOST_PORT="$(( 40000 + port_suffix ))"
export RENDEZVOUS_SMOKE_HTTP_URL="http://127.0.0.1:${RENDEZVOUS_HTTP_HOST_PORT}/" export RENDEZVOUS_HTTP_BIND_ADDRESS="0.0.0.0"
export RENDEZVOUS_SMOKE_UDP_ENDPOINT="127.0.0.1:${RENDEZVOUS_UDP_HOST_PORT}" runner_host_gateway="$(docker inspect "$HOSTNAME" | jq -er \
'.[0].NetworkSettings.Networks | to_entries[0].value.Gateway')"
export RENDEZVOUS_SMOKE_HTTP_URL="http://${runner_host_gateway}:${RENDEZVOUS_HTTP_HOST_PORT}/"
export RENDEZVOUS_SMOKE_UDP_ENDPOINT="${runner_host_gateway}:${RENDEZVOUS_UDP_HOST_PORT}"
runner_workspace_source="$(docker inspect "$HOSTNAME" | jq -er \ runner_workspace_source="$(docker inspect "$HOSTNAME" | jq -er \
--arg destination "$GITHUB_WORKSPACE" \ --arg destination "$GITHUB_WORKSPACE" \
'.[0].Mounts[] | select(.Destination == $destination) | .Source')" '.[0].Mounts[] | select(.Destination == $destination) | .Source')"
+1 -1
View File
@@ -33,5 +33,5 @@ services:
- ${RENDEZVOUS_CONFIG_SOURCE:-./appsettings.Production.json}:/app/appsettings.Production.json:ro - ${RENDEZVOUS_CONFIG_SOURCE:-./appsettings.Production.json}:/app/appsettings.Production.json:ro
- ${RENDEZVOUS_SECRET_SOURCE:-./secrets/signing-key}:/run/secrets/rendezvous-signing-key:ro - ${RENDEZVOUS_SECRET_SOURCE:-./secrets/signing-key}:/run/secrets/rendezvous-signing-key:ro
ports: ports:
- "127.0.0.1:${RENDEZVOUS_HTTP_HOST_PORT:-8080}:8080/tcp" - "${RENDEZVOUS_HTTP_BIND_ADDRESS:-127.0.0.1}:${RENDEZVOUS_HTTP_HOST_PORT:-8080}:8080/tcp"
- "${RENDEZVOUS_UDP_HOST_PORT:-9050}:9050/udp" - "${RENDEZVOUS_UDP_HOST_PORT:-9050}:9050/udp"
+3 -1
View File
@@ -49,7 +49,9 @@ Compose, then point `RENDEZVOUS_SMOKE_HTTP_URL` and
and production-advertised service ports remain 8080/9050. Sibling-container CI and production-advertised service ports remain 8080/9050. Sibling-container CI
runners may also set `RENDEZVOUS_CONFIG_SOURCE` and runners may also set `RENDEZVOUS_CONFIG_SOURCE` and
`RENDEZVOUS_SECRET_SOURCE` to host-visible absolute bind-source paths; local `RENDEZVOUS_SECRET_SOURCE` to host-visible absolute bind-source paths; local
operators should normally keep the checked-in relative defaults. operators should normally keep the checked-in relative defaults. Those runners
may set `RENDEZVOUS_HTTP_BIND_ADDRESS=0.0.0.0` and target their Docker host
gateway; do not widen the default loopback HTTP binding on an ordinary host.
`deploy/compose/appsettings.Production.json` is a local/private-bridge smoke `deploy/compose/appsettings.Production.json` is a local/private-bridge smoke
profile, not an Internet template: TCP is published only on host loopback, the profile, not an Internet template: TCP is published only on host loopback, the
@@ -169,6 +169,7 @@ public sealed class ReleaseCompatibilityTests
{ {
string root = FindRepositoryRoot(); string root = FindRepositoryRoot();
string compose = File.ReadAllText(Path.Combine(root, "deploy/compose/compose.yaml")); string compose = File.ReadAllText(Path.Combine(root, "deploy/compose/compose.yaml"));
Assert.Contains("${RENDEZVOUS_HTTP_BIND_ADDRESS:-127.0.0.1}", compose, StringComparison.Ordinal);
Assert.Contains("${RENDEZVOUS_HTTP_HOST_PORT:-8080}:8080/tcp", compose, StringComparison.Ordinal); Assert.Contains("${RENDEZVOUS_HTTP_HOST_PORT:-8080}:8080/tcp", compose, StringComparison.Ordinal);
Assert.Contains("${RENDEZVOUS_UDP_HOST_PORT:-9050}:9050/udp", compose, StringComparison.Ordinal); Assert.Contains("${RENDEZVOUS_UDP_HOST_PORT:-9050}:9050/udp", compose, StringComparison.Ordinal);
Assert.Contains("${RENDEZVOUS_CONFIG_SOURCE:-./appsettings.Production.json}", compose, StringComparison.Ordinal); Assert.Contains("${RENDEZVOUS_CONFIG_SOURCE:-./appsettings.Production.json}", compose, StringComparison.Ordinal);
@@ -178,6 +179,8 @@ public sealed class ReleaseCompatibilityTests
{ {
string workflow = File.ReadAllText(Path.Combine(root, ".gitea/workflows", workflowName)); string workflow = File.ReadAllText(Path.Combine(root, ".gitea/workflows", workflowName));
Assert.Contains("GITHUB_RUN_ID", workflow, StringComparison.Ordinal); Assert.Contains("GITHUB_RUN_ID", workflow, StringComparison.Ordinal);
Assert.Contains("runner_host_gateway", workflow, StringComparison.Ordinal);
Assert.Contains("RENDEZVOUS_HTTP_BIND_ADDRESS", workflow, StringComparison.Ordinal);
Assert.Contains("RENDEZVOUS_HTTP_HOST_PORT", workflow, StringComparison.Ordinal); Assert.Contains("RENDEZVOUS_HTTP_HOST_PORT", workflow, StringComparison.Ordinal);
Assert.Contains("RENDEZVOUS_UDP_HOST_PORT", workflow, StringComparison.Ordinal); Assert.Contains("RENDEZVOUS_UDP_HOST_PORT", workflow, StringComparison.Ordinal);
Assert.Contains("RENDEZVOUS_SMOKE_HTTP_URL", workflow, StringComparison.Ordinal); Assert.Contains("RENDEZVOUS_SMOKE_HTTP_URL", workflow, StringComparison.Ordinal);