feat: add scripts/cleanup-old-runs.sh — delete legacy Cloud Run services
This commit is contained in:
parent
a51ccc817f
commit
749b3be927
36
scripts/cleanup-old-runs.sh
Normal file
36
scripts/cleanup-old-runs.sh
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env bash
|
||||
# cleanup-old-runs.sh — Delete legacy Cloud Run services from pre-OSVauco era
|
||||
# Run once: source .env && bash scripts/cleanup-old-runs.sh
|
||||
set -euo pipefail
|
||||
|
||||
: "${PROJECT_ID:?Set PROJECT_ID}"
|
||||
: "${REGION:?Set REGION}"
|
||||
|
||||
SERVICES=(
|
||||
"genai-app-vaucooscommandhub-l"
|
||||
"genai-app-vaucooscommandhub-dev"
|
||||
"opax-mcp-core"
|
||||
"vauco-os-codeoss-chat"
|
||||
)
|
||||
|
||||
echo "=== Deleting legacy Cloud Run services ==="
|
||||
echo " Project: $PROJECT_ID"
|
||||
echo " Region: $REGION"
|
||||
echo ""
|
||||
|
||||
for SVC in "${SERVICES[@]}"; do
|
||||
if gcloud run services describe "$SVC" \
|
||||
--project="$PROJECT_ID" \
|
||||
--region="$REGION" &>/dev/null; then
|
||||
gcloud run services delete "$SVC" \
|
||||
--project="$PROJECT_ID" \
|
||||
--region="$REGION" \
|
||||
--quiet
|
||||
echo " [OK] Deleted: $SVC"
|
||||
else
|
||||
echo " [--] Not found (already gone): $SVC"
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "=== Cleanup COMPLETE ==="
|
||||
Loading…
Reference in New Issue
Block a user