File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -44,18 +44,21 @@ jobs:
44
44
run : |
45
45
. venv/bin/activate
46
46
CI_CLUSTERS=$(openstack server list | grep --only-matching 'slurmci-RL.-[0-9]\+' | sort | uniq || true)
47
+ echo "DEBUG: Raw CI clusters: $CI_CLUSTERS"
48
+
47
49
if [[ -z "$CI_CLUSTERS" ]]; then
48
50
echo "No matching CI clusters found."
49
51
else
50
- echo "Found clusters: $CI_CLUSTERS"
51
- echo "ci_clusters=$CI_CLUSTERS" >> $GITHUB_ENV
52
+ # Flatten multiline value so can be passed as env var
53
+ CI_CLUSTERS_FORMATTED=$(echo "$CI_CLUSTERS" | tr '\n' ' ' | sed 's/ $//')
54
+ echo "DEBUG : Formatted CI clusters: $CI_CLUSTERS_FORMATTED"
55
+ echo "ci_clusters=$CI_CLUSTERS_FORMATTED" >> $GITHUB_ENV
52
56
fi
53
57
shell : bash
54
58
55
59
- name : Delete clusters if control node not tagged with keep
56
60
run : |
57
61
. venv/bin/activate
58
- echo "Found clusters: ${{ env.ci_clusters }}"
59
62
if [[ -z ${ci_clusters} ]]; then
60
63
echo "No clusters to delete."
61
64
exit 0
67
70
if [[ $TAGS =~ "keep" ]]; then
68
71
echo "Skipping ${cluster_prefix} - control instance is tagged as keep"
69
72
else
70
- yes | ./dev/delete-cluster.py ${cluster_prefix}
73
+ ./dev/delete-cluster.py ${cluster_prefix} --force
71
74
fi
72
75
done
73
76
shell : bash
You can’t perform that action at this time.
0 commit comments