Files
computer-playbook/scripts/tests/deploy/act/shell_node.sh
T
kevinveenbirkenbachandClaude Opus 4.8 3a55877a39 refactor(swarm-test): SPOT topology naming in default.env + add act-swarm-clean
Hoist the swarm-test node, network and NFS-export-base names out of the shell
harness (00_topology.sh) into default.env (INFINITO_SWARM_*), so the shell
harness and the Python harness (extend_inventory, write_extras) read one source
instead of each hardcoding the suffixes. 00_topology.sh, extend_inventory.py,
write_extras.py and 01/09/11 now read the SPOT; passthrough.py exports the keys
into the generated .env. 00_topology.sh reads default.env directly (not .env)
because the workflow sources it before make dotenv runs.

Rename topology.sh -> 00_topology.sh (sorts ahead of 01_/02_, the order it is
sourced in) and update all 10 references.

Add scripts/tests/deploy/swarm/clean_all.sh + make act-swarm-clean to reclaim
wedged act-swarm state between runs, label-scoped via INFINITO_SWARM_TEST_LABEL
so it never touches unrelated containers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 18:31:34 +02:00

19 lines
582 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# shellcheck source=scripts/tests/deploy/swarm/00_topology.sh
. "$(dirname "$0")/../swarm/00_topology.sh"
node="${node:-${MGR}}"
if ! docker inspect --format '{{.State.Running}}' "${node}" 2>/dev/null | grep -q '^true$'; then
echo "ERROR: container '${node}' is not running." >&2
echo "Available swarm-test containers (if any):" >&2
docker ps --format ' {{.Names}}\t{{.Status}}' |
grep -E 'swarm-|nfs-server' >&2 ||
echo " (none — run \`make act-swarm-zombie app=<id>\` first)" >&2
exit 1
fi
exec docker exec -it "${node}" bash