File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 11
11
- SMS
12
12
- ARCUS
13
13
schedule :
14
- - cron : ' 0 20 * * *' # Run at 8PM - image sync runs at midnight
14
+ - cron : ' 0 21 * * *' # Run at 9PM - image sync runs at midnight
15
15
16
16
jobs :
17
17
ci_cleanup :
@@ -52,13 +52,23 @@ jobs:
52
52
- name : Find CI clusters
53
53
run : |
54
54
. venv/bin/activate
55
- CI_CLUSTERS=$(openstack server list | grep --only-matching 'slurmci-RL.-[0-9]\+' | sort | uniq)
56
- echo "ci_clusters=${CI_CLUSTERS}" >> GITHUB_ENV
55
+ CI_CLUSTERS=$(openstack server list | grep --only-matching 'slurmci-RL.-[0-9]\+' | sort | uniq || true)
56
+ if [[ -z "$CI_CLUSTERS" ]]; then
57
+ echo "No matching CI clusters found."
58
+ else
59
+ echo "Found clusters: $CI_CLUSTERS"
60
+ echo "ci_clusters=${CI_CLUSTERS}" >> GITHUB_ENV
61
+ fi
57
62
shell : bash
58
63
59
64
- name : Delete clusters if control node not tagged with keep
60
65
run : |
61
66
. venv/bin/activate
67
+ if [[ -z "${CI_CLUSTERS}" ]]; then
68
+ echo "No clusters to delete."
69
+ exit 0
70
+ fi
71
+
62
72
for cluster_prefix in ${CI_CLUSTERS}
63
73
do
64
74
TAGS=$(openstack server show ${cluster_prefix}-control --column tags --format value)
You can’t perform that action at this time.
0 commit comments