@@ -17,31 +17,28 @@ jobs:
1717 openstack :
1818 name : openstack-imagebuild
1919 concurrency :
20- group : ${{ github.workflow }}-${{ github.ref }}-${{ matrix.source_image.name }}-${{ matrix.inventory_groups. label }} # to branch/PR + OS + build
20+ group : ${{ github.workflow }}-${{ github.ref }}-${{ matrix.builds. label }}
2121 cancel-in-progress : true
2222 runs-on : ubuntu-22.04
2323 strategy :
2424 fail-fast : false # allow other matrix jobs to continue even if one fails
2525 matrix :
26- source_image :
27- - label : RL8
28- name : Rocky-8-GenericCloud-Base-8.9-20231119.0.x86_64.qcow2
29- - label : RL9
30- name : Rocky-9-GenericCloud-Base-9.4-20240523.0.x86_64.qcow2
31- inventory_groups :
32- - label : ofed
33- list : ' update,ofed'
34- - label : cuda
35- list : ' update,ofed,cuda'
36- exclude :
37- - source_image : {label: RL8}
38- inventory_groups : {label: cuda}
26+ builds :
27+ - label : RL8-ofed
28+ source_image_name : Rocky-8-GenericCloud-Base-8.9-20231119.0.x86_64.qcow2
29+ inventory_groups : ' update,ofed'
30+ - label : RL9-ofed
31+ source_image_name : Rocky-9-GenericCloud-Base-9.4-20240523.0.x86_64.qcow2
32+ inventory_groups : ' update,ofed'
33+ - label : RL9-cuda
34+ source_image_name : Rocky-9-GenericCloud-Base-9.4-20240523.0.x86_64.qcow2
35+ inventory_groups : ' update,ofed,cuda'
3936 env :
4037 ANSIBLE_FORCE_COLOR : True
4138 OS_CLOUD : openstack
4239 CI_CLOUD : ${{ github.event.inputs.ci_cloud || vars.CI_CLOUD }}
4340 # set the image suffix to -latest for cron jobs or a branch name if manually-triggered
44- IMAGE_NAME_SUFFIX : ${{ github.event_name == 'schedule' && 'latest' || github.ref_name }}
41+ IMAGE_SUFFIX : ${{ github.event_name == 'schedule' && 'latest' || github.ref_name }}
4542
4643 steps :
4744 - uses : actions/checkout@v2
@@ -88,14 +85,13 @@ jobs:
8885 packer build \
8986 -on-error=${{ vars.PACKER_ON_ERROR }} \
9087 -var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
91- -var source_image_name=${{ matrix.source_image.name }} \
92- -var image_name=rocky- ${{ matrix.source_image.label }}-${{ matrix.inventory_groups .label }} \
93- -var image_name_suffix =${{ env.IMAGE_NAME_SUFFIX }} \
94- -var inventory_groups=${{ matrix.inventory_groups.list }} \
88+ -var source_image_name=${{ matrix.builds.source_image_name }} \
89+ -var image_name=${{ matrix.builds .label }} \
90+ -var image_version =${{ env.IMAGE_SUFFIX }} \
91+ -var inventory_groups=${{ matrix.builds.inventory_groups }} \
9592 openstack.pkr.hcl
9693 env :
9794 PACKER_LOG : ' 1'
98-
9995
10096 - name : Get created image names from manifest
10197 id : manifest
0 commit comments