94
94
source venvs/kayobe/bin/activate &&
95
95
pip install python-openstackclient -c https://opendev.org/openstack/requirements/raw/branch/stable/yoga/upper-constraints.txt
96
96
97
+ - name : Output CentOS Stream 8 image tag
98
+ id : centos_8_stream_image_tag
99
+ run : |
100
+ echo image_tag=$(grep stackhpc_centos_8_stream_overcloud_host_image_version: src/kayobe-config/etc/kayobe/pulp-host-image-versions.yml | awk '{print $2}') >> $GITHUB_OUTPUT
101
+
102
+ - name : Check if image exists already
103
+ id : centos_8_stream_image_exists
104
+ run : |
105
+ source venvs/kayobe/bin/activate &&
106
+ openstack image show \
107
+ overcloud-centos-8-stream-${{ steps.centos_8_stream_image_tag.outputs.image_tag }}
108
+ continue-on-error : true
109
+
97
110
- name : Download CentOS Stream 8 overcloud host image from Ark
98
111
run : |
99
112
source venvs/kayobe/bin/activate &&
@@ -104,12 +117,7 @@ jobs:
104
117
-e os_release="8-stream"
105
118
env :
106
119
KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
107
- if : inputs.centos
108
-
109
- - name : Output CentOS Stream 8 image tag
110
- id : centos_8_stream_image_tag
111
- run : |
112
- echo image_tag=$(grep stackhpc_centos_8_stream_overcloud_host_image_version: src/kayobe-config/etc/kayobe/pulp-host-image-versions.yml | awk '{print $2}') >> $GITHUB_OUTPUT
120
+ if : inputs.centos && steps.centos_8_stream_image_exists.outcome == 'failure'
113
121
114
122
- name : Upload CentOS Stream 8 overcloud host image to Cloud
115
123
run : |
@@ -125,7 +133,20 @@ jobs:
125
133
OS_CLOUD : openstack
126
134
OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
127
135
OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
128
- if : inputs.centos
136
+ if : inputs.centos && steps.centos_8_stream_image_exists.outcome == 'failure'
137
+
138
+ - name : Output Rocky Linux 8 image tag
139
+ id : rocky_8_image_tag
140
+ run : |
141
+ echo image_tag=$(grep stackhpc_rocky_8_overcloud_host_image_version: src/kayobe-config/etc/kayobe/pulp-host-image-versions.yml | awk '{print $2}') >> $GITHUB_OUTPUT
142
+
143
+ - name : Check if image exists already
144
+ id : rocky_8_image_exists
145
+ run : |
146
+ source venvs/kayobe/bin/activate &&
147
+ openstack image show \
148
+ overcloud-rocky-8-${{ steps.rocky_8_image_tag.outputs.image_tag }}
149
+ continue-on-error : true
129
150
130
151
- name : Download Rocky Linux 8 overcloud host image from Ark
131
152
run : |
@@ -137,12 +158,7 @@ jobs:
137
158
-e os_release="8"
138
159
env :
139
160
KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
140
- if : inputs.rocky8
141
-
142
- - name : Output Rocky Linux 8 image tag
143
- id : rocky_8_image_tag
144
- run : |
145
- echo image_tag=$(grep stackhpc_rocky_8_overcloud_host_image_version: src/kayobe-config/etc/kayobe/pulp-host-image-versions.yml | awk '{print $2}') >> $GITHUB_OUTPUT
161
+ if : inputs.rocky8 && steps.rocky_8_image_exists.outcome == 'failure'
146
162
147
163
- name : Upload Rocky Linux 8 overcloud host image to Cloud
148
164
run : |
@@ -158,7 +174,20 @@ jobs:
158
174
OS_CLOUD : openstack
159
175
OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
160
176
OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
161
- if : inputs.rocky8
177
+ if : inputs.rocky8 && steps.rocky_8_image_exists.outcome == 'failure'
178
+
179
+ - name : Output Rocky Linux 9 image tag
180
+ id : rocky_9_image_tag
181
+ run : |
182
+ echo image_tag=$(grep stackhpc_rocky_9_overcloud_host_image_version: src/kayobe-config/etc/kayobe/pulp-host-image-versions.yml | awk '{print $2}') >> $GITHUB_OUTPUT
183
+
184
+ - name : Check if image exists already
185
+ id : rocky_9_image_exists
186
+ run : |
187
+ source venvs/kayobe/bin/activate &&
188
+ openstack image show \
189
+ overcloud-rocky-9-${{ steps.rocky_9_image_tag.outputs.image_tag }}
190
+ continue-on-error : true
162
191
163
192
- name : Download Rocky Linux 9 overcloud host image from Ark
164
193
run : |
@@ -170,12 +199,7 @@ jobs:
170
199
-e os_release="9"
171
200
env :
172
201
KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
173
- if : inputs.rocky9
174
-
175
- - name : Output Rocky Linux 9 image tag
176
- id : rocky_9_image_tag
177
- run : |
178
- echo image_tag=$(grep stackhpc_rocky_9_overcloud_host_image_version: src/kayobe-config/etc/kayobe/pulp-host-image-versions.yml | awk '{print $2}') >> $GITHUB_OUTPUT
202
+ if : inputs.rocky9 && steps.rocky_9_image_exists.outcome == 'failure'
179
203
180
204
- name : Upload Rocky Linux 9 overcloud host image to Cloud
181
205
run : |
@@ -191,7 +215,20 @@ jobs:
191
215
OS_CLOUD : openstack
192
216
OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
193
217
OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
194
- if : inputs.rocky9
218
+ if : inputs.rocky9 && steps.rocky_9_image_exists.outcome == 'failure'
219
+
220
+ - name : Output Ubuntu Focal image tag
221
+ id : ubuntu_focal_image_tag
222
+ run : |
223
+ echo image_tag=$(grep stackhpc_ubuntu_focal_overcloud_host_image_version: src/kayobe-config/etc/kayobe/pulp-host-image-versions.yml | awk '{print $2}') >> $GITHUB_OUTPUT
224
+
225
+ - name : Check if image exists already
226
+ id : ubuntu_focal_image_exists
227
+ run : |
228
+ source venvs/kayobe/bin/activate &&
229
+ openstack image show \
230
+ overcloud-ubuntu-focal-${{ steps.ubuntu_focal_image_tag.outputs.image_tag }}
231
+ continue-on-error : true
195
232
196
233
- name : Download Ubuntu Focal 20.04 overcloud host image from Ark
197
234
run : |
@@ -203,12 +240,7 @@ jobs:
203
240
-e os_release="focal"
204
241
env :
205
242
KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
206
- if : inputs.ubuntu-focal
207
-
208
- - name : Output Ubuntu Focal image tag
209
- id : ubuntu_focal_image_tag
210
- run : |
211
- echo image_tag=$(grep stackhpc_ubuntu_focal_overcloud_host_image_version: src/kayobe-config/etc/kayobe/pulp-host-image-versions.yml | awk '{print $2}') >> $GITHUB_OUTPUT
243
+ if : inputs.ubuntu-focal && steps.ubuntu_focal_image_exists.outcome == 'failure'
212
244
213
245
- name : Upload Ubuntu Focal 20.04 overcloud host image to Cloud
214
246
run : |
@@ -224,7 +256,20 @@ jobs:
224
256
OS_CLOUD : openstack
225
257
OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
226
258
OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
227
- if : inputs.ubuntu-focal
259
+ if : inputs.ubuntu-focal && steps.ubuntu_focal_image_exists.outcome == 'failure'
260
+
261
+ - name : Output Ubuntu Jammy image tag
262
+ id : ubuntu_jammy_image_tag
263
+ run : |
264
+ echo image_tag=$(grep stackhpc_ubuntu_jammy_overcloud_host_image_version: src/kayobe-config/etc/kayobe/pulp-host-image-versions.yml | awk '{print $2}') >> $GITHUB_OUTPUT
265
+
266
+ - name : Check if image exists already
267
+ id : ubuntu_jammy_image_exists
268
+ run : |
269
+ source venvs/kayobe/bin/activate &&
270
+ openstack image show \
271
+ overcloud-ubuntu-jammy-${{ steps.ubuntu_jammy_image_tag.outputs.image_tag }}
272
+ continue-on-error : true
228
273
229
274
- name : Download Ubuntu Jammy 22.04 overcloud host image from Ark
230
275
run : |
@@ -236,12 +281,7 @@ jobs:
236
281
-e os_release="jammy"
237
282
env :
238
283
KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
239
- if : inputs.ubuntu-jammy
240
-
241
- - name : Output Ubuntu Jammy image tag
242
- id : ubuntu_jammy_image_tag
243
- run : |
244
- echo image_tag=$(grep stackhpc_ubuntu_jammy_overcloud_host_image_version: src/kayobe-config/etc/kayobe/pulp-host-image-versions.yml | awk '{print $2}') >> $GITHUB_OUTPUT
284
+ if : inputs.ubuntu-jammy && steps.ubuntu_jammy_image_exists.outcome == 'failure'
245
285
246
286
- name : Upload Ubuntu Jammy 22.04 overcloud host image to Cloud
247
287
run : |
@@ -257,4 +297,4 @@ jobs:
257
297
OS_CLOUD : openstack
258
298
OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
259
299
OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
260
- if : inputs.ubuntu-jammy
300
+ if : inputs.ubuntu-jammy && steps.ubuntu_jammy_image_exists.outcome == 'failure'
0 commit comments