File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change 56
56
fi
57
57
shell : bash
58
58
59
- - name : Delete clusters if control node not tagged with keep
59
+ - name : Delete clusters
60
60
run : |
61
61
. venv/bin/activate
62
62
if [[ -z ${ci_clusters} ]]; then
@@ -69,12 +69,12 @@ jobs:
69
69
echo "Processing cluster: $cluster_prefix"
70
70
71
71
# Get all servers with the matching name for control node
72
- CONTROL_SERVERS=$(openstack server list --name ${cluster_prefix}-control --long -- format json)
72
+ CONTROL_SERVERS=$(openstack server list --name ${cluster_prefix}-control --format json)
73
73
74
74
# Get unique server names to avoid duplicate cleanup
75
75
UNIQUE_NAMES=$(echo "$CONTROL_SERVERS" | jq -r '.[].Name' | sort | uniq)
76
76
for name in $UNIQUE_NAMES; do
77
- echo "Checking control node: $name"
77
+ echo "Deleting cluster with control node: $name"
78
78
79
79
# Get the first matching server ID by name
80
80
server=$(echo "$CONTROL_SERVERS" | jq -r '.[] | select(.Name=="'"$name"'") | .ID' | head -n1)
85
85
continue
86
86
fi
87
87
88
- # Get tags for the server
89
- TAGS=$(openstack server show "$server" --column tags --format value)
90
-
91
- if [[ $TAGS =~ "keep" ]]; then
92
- echo "Skipping $cluster_prefix - control instance is tagged as keep"
93
- else
94
- echo "Deleting cluster $cluster_prefix (server $server)..."
95
- ./dev/delete-cluster.py $cluster_prefix --force
96
- fi
88
+ echo "Deleting cluster $cluster_prefix (server $server)..."
89
+ ./dev/delete-cluster.py $cluster_prefix --force
97
90
done
98
91
done
99
92
shell : bash
You can’t perform that action at this time.
0 commit comments