@@ -17,36 +17,38 @@ jobs:
17
17
openstack :
18
18
name : openstack-imagebuild
19
19
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
21
21
cancel-in-progress : true
22
22
runs-on : ubuntu-22.04
23
23
strategy :
24
24
fail-fast : false # allow other matrix jobs to continue even if one fails
25
25
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
29
31
inventory_groups :
30
- - ["update", "ofed"]
31
- - ["update", "ofed", "cuda"]
32
+ - label : ofed
33
+ list : ' update,ofed'
34
+ - label : cuda
35
+ list : ' update,ofed,cuda'
32
36
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}
35
39
env :
36
40
ANSIBLE_FORCE_COLOR : True
37
41
OS_CLOUD : openstack
38
42
CI_CLOUD : ${{ github.event.inputs.ci_cloud || vars.CI_CLOUD }}
39
43
# set the image suffix to -latest for cron jobs or a branch name if manually-triggered
40
44
IMAGE_NAME_SUFFIX : ${{ github.event_name == 'schedule' && 'latest' || github.ref_name }}
41
-
42
45
43
46
steps :
44
47
- uses : actions/checkout@v2
45
48
46
49
- name : Record settings for CI cloud
47
50
run : |
48
51
echo CI_CLOUD: ${{ env.CI_CLOUD }}
49
- echo IMAGE_NAME_SUFFIX: ${{ env.IMAGE_NAME_SUFFIX }}
50
52
51
53
- name : Setup ssh
52
54
run : |
@@ -86,10 +88,10 @@ jobs:
86
88
packer build \
87
89
-on-error=${{ vars.PACKER_ON_ERROR }} \
88
90
-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 }} \
91
93
-var image_name_suffix=${{ env.IMAGE_NAME_SUFFIX }} \
92
- -var inventory_groups=${{ matrix.inventory_groups }} \
94
+ -var inventory_groups=${{ matrix.inventory_groups.list }} \
93
95
openstack.pkr.hcl
94
96
env :
95
97
PACKER_LOG : ' 1'
0 commit comments