55
55
description : Whether to run the workflow (workaround for required status checks issue)
56
56
type : boolean
57
57
default : true
58
+ upgrade :
59
+ description : Whether to perform an upgrade
60
+ type : boolean
61
+ default : false
58
62
secrets :
59
63
KAYOBE_VAULT_PASSWORD :
60
64
required : true
@@ -78,14 +82,25 @@ jobs:
78
82
KAYOBE_IMAGE : ${{ inputs.kayobe_image }}
79
83
# NOTE(upgrade): Reference the PREVIOUS release here.
80
84
PREVIOUS_KAYOBE_IMAGE : ghcr.io/stackhpc/stackhpc-kayobe-config:stackhpc-yoga
85
+ # NOTE(upgrade): Reference the PREVIOUS release branch here.
86
+ PREVIOUS_BRANCH : stackhpc/yoga
81
87
steps :
82
88
# Checkout previous release
83
89
- uses : actions/checkout@v3
84
90
with :
85
- # NOTE(upgrade): Reference the PREVIOUS release branch here.
86
- ref : stackhpc/yoga
91
+ ref : ${{ inputs.upgrade && env.PREVIOUS_BRANCH }}
87
92
submodules : true
88
93
94
+ - name : Output Kayobe image
95
+ id : kayobe_image
96
+ run : |
97
+ if ${{ inputs.upgrade }}; then
98
+ kayobe_image=$PREVIOUS_KAYOBE_IMAGE
99
+ else
100
+ kayobe_image=$KAYOBE_IMAGE
101
+ fi
102
+ echo kayobe_image=$kayobe_image >> $GITHUB_OUTPUT
103
+
89
104
- name : Output image tag
90
105
id : image_tag
91
106
run : |
@@ -141,7 +156,7 @@ jobs:
141
156
VM_NETWORK : ${{ inputs.vm_network }}
142
157
VM_SUBNET : ${{ inputs.vm_subnet }}
143
158
VM_INTERFACE : ${{ inputs.vm_interface }}
144
- VM_VOLUME_SIZE : 45
159
+ VM_VOLUME_SIZE : ${{ inputs.upgrade && '45' || '35' }}
145
160
146
161
- name : Terraform Plan
147
162
run : terraform plan
@@ -216,7 +231,8 @@ jobs:
216
231
# The same tag may be reused (e.g. stackhpc/yoga), so ensure we have the latest image.
217
232
- name : Pull previous Kayobe image
218
233
run : |
219
- sudo docker image pull $PREVIOUS_KAYOBE_IMAGE
234
+ sudo docker image pull ${{ steps.kayobe_image.outputs.kayobe_image }}
235
+ if : inputs.upgrade
220
236
221
237
# The same tag may be reused (e.g. pr-123), so ensure we have the latest image.
222
238
- name : Pull current Kayobe image
@@ -228,7 +244,7 @@ jobs:
228
244
sudo -E docker run -t --rm \
229
245
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
230
246
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
231
- $PREVIOUS_KAYOBE_IMAGE \
247
+ ${{ steps.kayobe_image.outputs.kayobe_image }} \
232
248
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/growroot.yml'
233
249
env :
234
250
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
@@ -238,7 +254,7 @@ jobs:
238
254
sudo -E docker run -t --rm \
239
255
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
240
256
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
241
- $PREVIOUS_KAYOBE_IMAGE \
257
+ ${{ steps.kayobe_image.outputs.kayobe_image }} \
242
258
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-host-configure.sh
243
259
env :
244
260
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
@@ -248,7 +264,7 @@ jobs:
248
264
sudo -E docker run -t --rm \
249
265
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
250
266
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
251
- $PREVIOUS_KAYOBE_IMAGE \
267
+ ${{ steps.kayobe_image.outputs.kayobe_image }} \
252
268
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-service-deploy.sh
253
269
env :
254
270
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
@@ -258,22 +274,25 @@ jobs:
258
274
sudo -E docker run -t --rm \
259
275
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
260
276
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
261
- $PREVIOUS_KAYOBE_IMAGE \
277
+ ${{ steps.kayobe_image.outputs.kayobe_image }} \
262
278
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh etc/kayobe/ansible/configure-aio-resources.yml
263
279
env :
264
280
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
265
281
266
282
- name : Stash config changes
267
283
run : git stash
284
+ if : inputs.upgrade
268
285
269
286
# Now begin upgrade
270
287
- uses : actions/checkout@v3
271
288
with :
272
289
submodules : true
273
290
clean : false
291
+ if : inputs.upgrade
274
292
275
293
- name : Pop stashed config changes
276
294
run : git stash pop
295
+ if : inputs.upgrade
277
296
278
297
- name : Host upgrade
279
298
run : |
@@ -284,6 +303,7 @@ jobs:
284
303
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-host-upgrade.sh
285
304
env :
286
305
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
306
+ if : inputs.upgrade
287
307
288
308
- name : Host configure
289
309
run : |
@@ -294,6 +314,7 @@ jobs:
294
314
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-host-configure.sh
295
315
env :
296
316
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
317
+ if : inputs.upgrade
297
318
298
319
- name : Service upgrade
299
320
run : |
@@ -304,6 +325,7 @@ jobs:
304
325
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-service-upgrade.sh
305
326
env :
306
327
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY : ${{ steps.ssh_key.outputs.ssh_key }}
328
+ if : inputs.upgrade
307
329
308
330
- name : Tempest tests
309
331
run : |
@@ -320,7 +342,7 @@ jobs:
320
342
- name : Upload test result artifacts
321
343
uses : actions/upload-artifact@v3
322
344
with :
323
- name : tempest-results-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}
345
+ name : tempest-results-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}${{ inputs.upgrade && '-upgrade' }}
324
346
path : tempest-artifacts/*
325
347
326
348
- name : Fail if any Tempest tests failed
0 commit comments