51
51
type : string
52
52
default : main
53
53
upgrade :
54
+ # Supported values: 'none', 'minor', 'major'
54
55
description : Whether to perform an upgrade
55
- type : boolean
56
- default : false
56
+ default : none
57
+ type : string
57
58
break_on :
58
59
# Supported values: 'always', 'never', 'failure', 'success'
59
60
description : When to break execution for manual interaction
98
99
run : |
99
100
echo "StackHPC Kayobe Configuration previous version must be defined for upgrades"
100
101
exit 1
101
- if : ${{ inputs.upgrade && inputs.stackhpc_kayobe_config_previous_version == '' }}
102
+ if : ${{ ( inputs.upgrade != 'none') && inputs.stackhpc_kayobe_config_previous_version == '' }}
102
103
103
104
- name : Fail if no SSH key is provided for break_on
104
105
run : |
@@ -112,11 +113,11 @@ jobs:
112
113
apt : git unzip nodejs python3-pip python3-venv rsync openssh-client
113
114
114
115
# If testing upgrade, checkout previous release, otherwise checkout current branch
115
- - name : Checkout ${{ inputs.upgrade && 'previous release' || 'current' }} config
116
+ - name : Checkout ${{ ( inputs.upgrade != 'none') && 'previous release' || 'current' }} config
116
117
uses : actions/checkout@v4
117
118
with :
118
119
repository : stackhpc/stackhpc-kayobe-config
119
- ref : ${{ inputs.upgrade && inputs.stackhpc_kayobe_config_previous_version || inputs.stackhpc_kayobe_config_version }}
120
+ ref : ${{ ( inputs.upgrade != 'none') && inputs.stackhpc_kayobe_config_previous_version || inputs.stackhpc_kayobe_config_version }}
120
121
121
122
- name : Checkout terraform-kayobe-multinode
122
123
uses : actions/checkout@v4
@@ -263,7 +264,7 @@ jobs:
263
264
echo '${{ env.KAYOBE_VAULT_PASSWORD }}' > vault-pw
264
265
265
266
cat << EOF >> ansible/vars/defaults.yml
266
- kayobe_config_version: ${{ inputs.upgrade && inputs.stackhpc_kayobe_config_previous_version || inputs.stackhpc_kayobe_config_version }}
267
+ kayobe_config_version: ${{ ( inputs.upgrade != 'none') && inputs.stackhpc_kayobe_config_previous_version || inputs.stackhpc_kayobe_config_version }}
267
268
ssh_key_path: ${{ github.workspace }}/terraform-kayobe-multinode/id_rsa
268
269
vxlan_vni: ${{ steps.vxlan_vni.outputs.vxlan_vni }}
269
270
vault_password_path: ${{ github.workspace }}/terraform-kayobe-multinode/vault-pw
@@ -332,28 +333,35 @@ jobs:
332
333
source venv/bin/activate &&
333
334
ansible-playbook -v -i ansible/inventory.yml ansible/deploy-openstack.yml -e multinode_command=upgrade_prerequisites
334
335
working-directory : ${{ github.workspace }}/terraform-kayobe-multinode
335
- if : inputs.upgrade
336
+ if : inputs.upgrade == 'major'
336
337
337
338
- name : Upgrade Ansible control host
338
339
run : |
339
340
source venv/bin/activate &&
340
341
ansible-playbook -v -i ansible/inventory.yml ansible/deploy-openstack-config.yml -e upgrade=true -e kayobe_config_version=${{ inputs.stackhpc_kayobe_config_version }}
341
342
working-directory : ${{ github.workspace }}/terraform-kayobe-multinode
342
- if : inputs.upgrade
343
+ if : inputs.upgrade != 'none'
343
344
344
- - name : Upgrade OpenStack
345
+ - name : Run major OpenStack upgrade
345
346
run : |
346
347
source venv/bin/activate &&
347
348
ansible-playbook -v -i ansible/inventory.yml ansible/deploy-openstack.yml -e multinode_command=upgrade_overcloud
348
349
working-directory : ${{ github.workspace }}/terraform-kayobe-multinode
349
- if : inputs.upgrade
350
+ if : inputs.upgrade == 'major'
351
+
352
+ - name : Run minor OpenStack upgrade
353
+ run : |
354
+ source venv/bin/activate &&
355
+ ansible-playbook -v -i ansible/inventory.yml ansible/deploy-openstack.yml -e multinode_command=minor_upgrade
356
+ working-directory : ${{ github.workspace }}/terraform-kayobe-multinode
357
+ if : inputs.upgrade == 'minor'
350
358
351
359
- name : Run Tempest tests
352
360
run : |
353
361
source venv/bin/activate &&
354
362
ansible-playbook -v -i ansible/inventory.yml ansible/deploy-openstack.yml -e multinode_command=run_tempest
355
363
working-directory : ${{ github.workspace }}/terraform-kayobe-multinode
356
- if : inputs.upgrade
364
+ if : inputs.upgrade != 'none'
357
365
358
366
- name : Download deployment logs
359
367
run : |
@@ -366,7 +374,7 @@ jobs:
366
374
- name : Print final lines of tmux log
367
375
run : |
368
376
tail -n 250 ${{ github.workspace }}/logs/tmux.kayobe:0.log
369
- if : ${{ failure () && steps.config_ach.outcome == 'success' }}
377
+ if : ${{ always () && steps.config_ach.outcome == 'success' }}
370
378
371
379
# GitHub Actions does not accept filenames with certain characters, and
372
380
# fails the upload-artifact action if any exist. The tmux log file
@@ -382,7 +390,7 @@ jobs:
382
390
id : upload-results
383
391
uses : actions/upload-artifact@v4
384
392
with :
385
- name : test-results-multinode-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}${{ inputs.upgrade && '-upgrade' || '' }}
393
+ name : test-results-multinode-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}${{ ( inputs.upgrade != 'none') && '-upgrade' || '' }}
386
394
path : |
387
395
${{ github.workspace }}/logs/
388
396
if : ${{ always() && steps.config_ach.outcome == 'success' }}
0 commit comments