Files
computer-playbook/scripts/tests/deploy/act/copy_worktree_to_node.sh
T
kevinveenbirkenbachandClaude Opus 4.8 821ff4c386 feat(act-swarm): add act-swarm-playwright helper to rerun specs on the live cluster
Mirror compose-playwright for the act-swarm DinD cluster: copy the working-tree's modified files into the node's frozen bootstrap copy (the nodes are not bind-mounted), then rerun via rerun-spec.sh. rerun-spec.sh gains an opt-in TEST_E2E_PLAYWRIGHT_NETWORK_HOST that switches it to --network host (mirroring the deploy-time swarm branch in 02_run_one.yml) so cross-app canonical domains are reachable on the node; the compose path is unchanged. Document the all-green-before-redeploy gate in playwright.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 16:05:10 +02:00

20 lines
737 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
: "${node:?node= must be set, e.g. node=swarm-mgr-01}"
if ! docker inspect --format '{{.State.Running}}' "${node}" 2>/dev/null | grep -q '^true$'; then
echo "ERROR: container '${node}' is not running. Run \`make act-swarm-zombie app=<id>\` first." >&2
exit 1
fi
repo_root="$(cd "$(dirname "$0")/../../../.." && pwd)"
cd "${repo_root}"
# Mirror 04_bootstrap_nodes.sh: tar the working-tree's modified+untracked files into the
# node's frozen bootstrap copy at /opt/infinito-nexus (the nodes are not bind-mounted, so a
# repo edit is otherwise invisible on the node).
git ls-files -z -m -o --exclude-standard |
tar --null -cf - -T - |
docker exec -i "${node}" tar -C /opt/infinito-nexus -xpf -