Files
computer-playbook/scripts/tests/deploy/act/down_act_outer.sh
T
kevinveenbirkenbachandClaude Opus 5.5 46373c1ba3 fix(act): remove only the own worktree's act containers
down_act_outer.sh removed every container named act-*, so starting or
releasing a swarm drill in one worktree killed the act container of a
drill another worktree had running.

workflow.sh now labels act's job containers with
infinito.worktree=${INFINITO_CONTAINER} through the default
ACT_CONTAINER_OPTIONS, and down_act_outer.sh removes only containers
carrying the own label. Both scripts refuse to run without
INFINITO_CONTAINER, so the filter never widens to every act container;
make exports BASH_ENV, which loads it from .env.

Worktrees without a custom.env share the default container name and
therefore still share one label among themselves.

Closes #933

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 13:50:07 +02:00

16 lines
483 B
Bash
Executable File

#!/usr/bin/env bash
set +e
: "${INFINITO_CONTAINER:?INFINITO_CONTAINER is not set; source scripts/meta/env/load.sh or invoke via make}"
ids="$(docker ps -aq --filter "name=^act-" --filter "label=infinito.worktree=${INFINITO_CONTAINER}")"
if [ -n "${ids}" ]; then
echo "→ removing act outer container(s) of ${INFINITO_CONTAINER}: ${ids}"
# shellcheck disable=SC2086
docker rm -f ${ids} >/dev/null 2>&1
else
echo "→ no act outer container present (nothing to do)"
fi
exit 0