fix(ci): isolate Compose host ports (#1)
This commit is contained in:
@@ -155,6 +155,11 @@ jobs:
|
||||
chmod 0444 "$secret"
|
||||
export RENDEZVOUS_UID=1654
|
||||
export RENDEZVOUS_GID=1654
|
||||
port_suffix="$(( ${GITHUB_RUN_ID:-$$} % 10000 ))"
|
||||
export RENDEZVOUS_HTTP_HOST_PORT="$(( 20000 + 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_SMOKE_UDP_ENDPOINT="127.0.0.1:${RENDEZVOUS_UDP_HOST_PORT}"
|
||||
export SOURCE_REVISION_ID="$GITHUB_SHA"
|
||||
docker compose -f "$compose_file" build \
|
||||
--build-arg SOURCE_REVISION_ID="$SOURCE_REVISION_ID"
|
||||
@@ -166,7 +171,7 @@ jobs:
|
||||
test "$(docker inspect --format '{{range .Mounts}}{{if eq .Destination \"/app/appsettings.Production.json\"}}{{.RW}}{{end}}{{end}}' "$container_id")" = "false"
|
||||
test "$(docker inspect --format '{{range .Mounts}}{{if eq .Destination \"/run/secrets/rendezvous-signing-key\"}}{{.RW}}{{end}}{{end}}' "$container_id")" = "false"
|
||||
for attempt in {1..100}; do
|
||||
if curl --fail --silent http://127.0.0.1:8080/health/ready >/dev/null 2>&1; then
|
||||
if curl --fail --silent "${RENDEZVOUS_SMOKE_HTTP_URL%/}/health/ready" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
if (( attempt == 100 )); then
|
||||
|
||||
Reference in New Issue
Block a user