Isolate concurrent federation interop runs (SCR-4)
CI / validate-monitoring (push) Successful in 16s
CI / lint (push) Successful in 17s
CI / federation-interop (push) Successful in 1m40s
CI / test (push) Successful in 5m23s
CI / python-package (push) Skipped
CI / assets (push) Successful in 13s
CI / images (push) Successful in 31s
CI / trigger-deploy (push) Skipped
CI / notify (push) Successful in 5s
CI / validate-monitoring (push) Successful in 16s
CI / lint (push) Successful in 17s
CI / federation-interop (push) Successful in 1m40s
CI / test (push) Successful in 5m23s
CI / python-package (push) Skipped
CI / assets (push) Successful in 13s
CI / images (push) Successful in 31s
CI / trigger-deploy (push) Skipped
CI / notify (push) Successful in 5s
Let Docker allocate each run's network subnet instead of deriving a /24 from the run number, trust private ranges in GoToSocial, and tag/clean up api and ui images per run so overlapping runs (e.g. main push plus tag) cannot collide. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
735556bf21
commit
65cd610468
4 files changed
+16
-11
No files matched your search
@@ -2,6 +2,6 @@
|
||||
# docker compose for the federation interop stack (Scrobbler + GoToSocial).
|
||||
set -euo pipefail
|
||||
root="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
# INTEROP_PROJECT and INTEROP_SUBNET let concurrent runs (e.g. in CI) stay apart.
|
||||
# INTEROP_PROJECT (with a distinct SCROBBLER_IMAGE_TAG) lets concurrent runs (e.g. in CI) stay apart.
|
||||
exec docker compose -p "${INTEROP_PROJECT:-scrobbler-interop}" \
|
||||
-f "$root/docker-compose.yml" -f "$root/deploy/interop/docker-compose.interop.yml" "$@"
|
||||
@@ -6,7 +6,14 @@ here="$(cd "$(dirname "$0")" && pwd)"
|
||||
compose="$here/compose.sh"
|
||||
keep=0; [ "${1:-}" = "--keep" ] && keep=1
|
||||
|
||||
cleanup() { [ "$keep" = 1 ] || "$compose" down -v --remove-orphans >/dev/null 2>&1; }
|
||||
cleanup() {
|
||||
[ "$keep" = 1 ] && return 0
|
||||
"$compose" down -v --remove-orphans --rmi local >/dev/null 2>&1
|
||||
# Per-run api/ui images (tagged with SCROBBLER_IMAGE_TAG) would otherwise pile up
|
||||
[ -n "${SCROBBLER_IMAGE_TAG:-}" ] && "$compose" config --images 2>/dev/null \
|
||||
| grep ":${SCROBBLER_IMAGE_TAG}$" | xargs -r docker rmi >/dev/null 2>&1
|
||||
return 0
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
"$compose" down -v --remove-orphans >/dev/null 2>&1
|
||||
|
||||
Reference in new issue
Block a user