11
11
- SMS
12
12
- ARCUS
13
13
schedule :
14
- - cron : ' 0 0 * * *' # Run at midnight
14
+ - cron : ' 0 0 * * *' # Run at midnight on default branch
15
15
16
16
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.build.label }} # to branch/PR + OS
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 : # build RL8, RL9
26
- os_version :
27
- - RL8
28
- - RL9
29
26
build :
30
- - openstack.rocky-latest
27
+ - label : RL8
28
+ source_image_name : Rocky-8-GenericCloud-Base-8.9-20231119.0.x86_64.qcow2
29
+ - label : RL9
30
+ source_image_name : Rocky-9-GenericCloud-Base-9.4-20240523.0.x86_64.qcow2
31
31
env :
32
32
ANSIBLE_FORCE_COLOR : True
33
33
OS_CLOUD : openstack
34
34
CI_CLOUD : ${{ github.event.inputs.ci_cloud || vars.CI_CLOUD }}
35
- SOURCE_IMAGES_MAP : |
36
- {
37
- "RL8": "Rocky-8-GenericCloud-Base-8.9-20231119.0.x86_64.qcow2",
38
- "RL9": "Rocky-9-GenericCloud-Base-9.4-20240523.0.x86_64.qcow2"
39
- }
40
35
ARK_PASSWORD : ${{ secrets.ARK_PASSWORD }}
41
36
42
37
steps :
@@ -83,15 +78,12 @@ jobs:
83
78
84
79
PACKER_LOG=1 packer build \
85
80
-on-error=${{ vars.PACKER_ON_ERROR }} \
86
- -only=${{ matrix.build }} \
87
81
-var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
88
- -var "source_image_name=${{ env.SOURCE_IMAGE }}" \
82
+ -var "source_image_name=${{ matrix.build.source_image_name }}" \
83
+ -var "image_name=rocky-latest-${{ matrix.build.label }}" \
84
+ -var "inventory_groups=update" \
89
85
openstack.pkr.hcl
90
86
91
- env :
92
- PKR_VAR_os_version : ${{ matrix.os_version }}
93
- SOURCE_IMAGE : ${{ fromJSON(env.SOURCE_IMAGES_MAP)[matrix.os_version] }}
94
-
95
87
- name : Get created image names from manifest
96
88
id : manifest
97
89
run : |
@@ -125,7 +117,7 @@ jobs:
125
117
name : upload-nightly-targets
126
118
needs : openstack
127
119
concurrency :
128
- group : ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os_version }}-${{ matrix.image }}-${{ matrix.target_cloud }}
120
+ group : ${{ github.workflow }}-${{ github.ref }}-${{ matrix.build.label }}-${{ matrix.target_cloud }}
129
121
cancel-in-progress : true
130
122
runs-on : ubuntu-22.04
131
123
strategy :
@@ -135,18 +127,16 @@ jobs:
135
127
- LEAFCLOUD
136
128
- SMS
137
129
- ARCUS
138
- os_version :
139
- - RL8
140
- - RL9
141
- image :
142
- - rocky-latest
130
+ build :
131
+ - label : RL8
132
+ - label : RL9
143
133
exclude :
144
134
- target_cloud : LEAFCLOUD
145
135
env :
146
136
OS_CLOUD : openstack
147
137
SOURCE_CLOUD : ${{ github.event.inputs.ci_cloud || vars.CI_CLOUD }}
148
138
TARGET_CLOUD : ${{ matrix.target_cloud }}
149
- IMAGE_NAME : " ${{ matrix.image }}- ${{ matrix.os_version }}"
139
+ IMAGE_NAME : " rocky-latest- ${{ matrix.build.label }}"
150
140
steps :
151
141
- uses : actions/checkout@v2
152
142
0 commit comments