@@ -17,36 +17,38 @@ jobs:
1717 openstack :
1818 name : openstack-imagebuild
1919 concurrency :
20- group : ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os_version }}-${{ matrix.build }} # to branch/PR + OS + build
20+ group : ${{ github.workflow }}-${{ github.ref }}-${{ matrix.source_image.name }}-${{ matrix.inventory_groups.label }} # to branch/PR + OS + build
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_name :
27- - Rocky-8-GenericCloud-Base-8.9-20231119.0.x86_64.qcow2
28- - Rocky-9-GenericCloud-Base-9.4-20240523.0.x86_64.qcow2
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
2931 inventory_groups :
30- - ["update", "ofed"]
31- - ["update", "ofed", "cuda"]
32+ - label : ofed
33+ list : ' update,ofed'
34+ - label : cuda
35+ list : ' update,ofed,cuda'
3236 exclude :
33- - source_image_name : Rocky-8-GenericCloud-Base-8.9-20231119.0.x86_64.qcow2
34- inventory_groups : ' update,ofed, cuda'
37+ - source_image : {label: RL8}
38+ inventory_groups : {label: cuda}
3539 env :
3640 ANSIBLE_FORCE_COLOR : True
3741 OS_CLOUD : openstack
3842 CI_CLOUD : ${{ github.event.inputs.ci_cloud || vars.CI_CLOUD }}
3943 # set the image suffix to -latest for cron jobs or a branch name if manually-triggered
4044 IMAGE_NAME_SUFFIX : ${{ github.event_name == 'schedule' && 'latest' || github.ref_name }}
41-
4245
4346 steps :
4447 - uses : actions/checkout@v2
4548
4649 - name : Record settings for CI cloud
4750 run : |
4851 echo CI_CLOUD: ${{ env.CI_CLOUD }}
49- echo IMAGE_NAME_SUFFIX: ${{ env.IMAGE_NAME_SUFFIX }}
5052
5153 - name : Setup ssh
5254 run : |
@@ -86,10 +88,10 @@ jobs:
8688 packer build \
8789 -on-error=${{ vars.PACKER_ON_ERROR }} \
8890 -var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
89- -var source_image_name=${{ matrix.source_image_name }} \
90- -var image_name_prefix =rocky-${{ matrix.os_version }} \
91+ -var source_image_name=${{ matrix.source_image.name }} \
92+ -var image_name =rocky-${{ matrix.source_image.label }}-${{ matrix.inventory_groups.label }} \
9193 -var image_name_suffix=${{ env.IMAGE_NAME_SUFFIX }} \
92- -var inventory_groups=${{ matrix.inventory_groups }} \
94+ -var inventory_groups=${{ matrix.inventory_groups.list }} \
9395 openstack.pkr.hcl
9496 env :
9597 PACKER_LOG : ' 1'
0 commit comments