19 lines
592 B
Bash
19 lines
592 B
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
set -euo pipefail
|
||
|
|
|
||
|
|
# Manual-only helper to run `scripts/test_user_cleanup.py` inside the portal backend container.
|
||
|
|
#
|
||
|
|
# Usage (dry-run):
|
||
|
|
# scripts/test_user_cleanup.sh --prefix test-
|
||
|
|
#
|
||
|
|
# Usage (apply):
|
||
|
|
# scripts/test_user_cleanup.sh --prefix test- --apply --confirm test-
|
||
|
|
|
||
|
|
NS="${PORTAL_NAMESPACE:-bstein-dev-home}"
|
||
|
|
TARGET="${PORTAL_BACKEND_EXEC_TARGET:-deploy/bstein-dev-home-backend}"
|
||
|
|
|
||
|
|
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
|
||
|
|
|
||
|
|
cat "${SCRIPT_DIR}/test_user_cleanup.py" | kubectl -n "${NS}" exec -i "${TARGET}" -- python - "$@"
|
||
|
|
|