-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathdown.sh
More file actions
executable file
·23 lines (18 loc) · 861 Bytes
/
down.sh
File metadata and controls
executable file
·23 lines (18 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
# Tear down the entire opencomputer-ci RG. Big red button — only for full reset.
# Storage account contents (compat-corpus + checkpoints) and KV secrets are
# unrecoverable after this runs (KV soft-delete retains for 90 days; storage
# is gone). Confirm before invoking.
set -euo pipefail
RG="${RG:-opencomputer-ci}"
if ! az group exists --name "$RG" 2>/dev/null | grep -q true; then
echo "RG $RG doesn't exist; nothing to do."
exit 0
fi
echo ">>> About to delete EVERYTHING in resource group: $RG"
echo " (KV: opencomputer-ci-kv goes into 90-day soft-delete)"
echo " (Storage: data is permanently lost)"
read -r -p "Type 'yes' to proceed: " confirm
[[ "$confirm" == "yes" ]] || { echo "aborted."; exit 1; }
az group delete -n "$RG" --yes --no-wait
echo "delete initiated (running in background, takes ~5 min to complete)."