Skip to content

Commit d15ffce

Browse files
committed
define builds entirely via matrix
1 parent 0276573 commit d15ffce

File tree

3 files changed

+21
-15
lines changed

3 files changed

+21
-15
lines changed

.github/workflows/doca.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ jobs:
3535
fail-fast: false # allow other matrix jobs to continue even if one fails
3636
matrix: # build RL8, RL9
3737
build:
38-
- label: RL8
39-
source_image_name: rocky-latest-RL8
40-
- label: RL9
41-
source_image_name: rocky-latest-RL9
38+
- image_name: openhpc-doca-RL8
39+
source_image_name: openhpc-RL8 # TODO: needs to be injected from environments/.stackhpc/terraform/cluster_image.auto.tfvars.json
40+
inventory_groups: doca
41+
- image_name: openhpc-doca-RL9
42+
source_image_name: openhpc-RL9 # TODO: as above
43+
inventory_groups: doca
4244
env:
4345
ANSIBLE_FORCE_COLOR: True
4446
OS_CLOUD: openstack
@@ -91,8 +93,8 @@ jobs:
9193
-on-error=${{ vars.PACKER_ON_ERROR }} \
9294
-var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
9395
-var "source_image_name=${{ matrix.build.source_image_name }}" \
94-
-var "image_name=openhpc-doca-${{ matrix.build.label }}" \
95-
-var "inventory_groups=doca" \
96+
-var "image_name=${{ matrix.build.image_name }}" \
97+
-var "inventory_groups=${{ matrix.build.inventory_groups }}" \
9698
openstack.pkr.hcl
9799
98100
- name: Get created image names from manifest

.github/workflows/fatimage.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ jobs:
2222
fail-fast: false # allow other matrix jobs to continue even if one fails
2323
matrix: # build RL8, RL9
2424
build:
25-
- label: RL8
25+
- image_name: openhpc-RL8
2626
source_image_name: rocky-latest-RL8
27-
- label: RL9
27+
inventory_groups: control,compute,login
28+
- image_name: openhpc-RL9
2829
source_image_name: rocky-latest-RL9
30+
inventory_groups: control,compute,login
2931
env:
3032
ANSIBLE_FORCE_COLOR: True
3133
OS_CLOUD: openstack
@@ -78,8 +80,8 @@ jobs:
7880
-on-error=${{ vars.PACKER_ON_ERROR }} \
7981
-var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
8082
-var "source_image_name=${{ matrix.build.source_image_name }}" \
81-
-var "image_name=openhpc-${{ matrix.build.label }}" \
82-
-var "inventory_groups=control,compute,login" \
83+
-var "image_name=${{ matrix.build.image_name }}" \
84+
-var "inventory_groups=${{ matrix.build.inventory_groups }}" \
8385
openstack.pkr.hcl
8486
8587
- name: Get created image names from manifest
@@ -97,7 +99,7 @@ jobs:
9799
- name: Upload manifest artifact
98100
uses: actions/upload-artifact@v4
99101
with:
100-
name: image-details-${{ matrix.build.label }}
102+
name: image-details-${{ matrix.build.image_name }}
101103
path: |
102104
./image-id.txt
103105
./image-name.txt

.github/workflows/nightlybuild.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ jobs:
2424
fail-fast: false # allow other matrix jobs to continue even if one fails
2525
matrix: # build RL8, RL9
2626
build:
27-
- label: RL8
27+
- image_name: rocky-latest-RL8
2828
source_image_name: Rocky-8-GenericCloud-Base-8.9-20231119.0.x86_64.qcow2
29-
- label: RL9
29+
inventory_groups: update
30+
- image_name: rocky-latest-RL9
3031
source_image_name: Rocky-9-GenericCloud-Base-9.4-20240523.0.x86_64.qcow2
32+
inventory_groups: update
3133
env:
3234
ANSIBLE_FORCE_COLOR: True
3335
OS_CLOUD: openstack
@@ -80,8 +82,8 @@ jobs:
8082
-on-error=${{ vars.PACKER_ON_ERROR }} \
8183
-var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
8284
-var "source_image_name=${{ matrix.build.source_image_name }}" \
83-
-var "image_name=rocky-latest-${{ matrix.build.label }}" \
84-
-var "inventory_groups=update" \
85+
-var "image_name=${{ matrix.build.image_name }}" \
86+
-var "inventory_groups=${{ matrix.build.inventory_groups }}" \
8587
openstack.pkr.hcl
8688
8789
- name: Get created image names from manifest

0 commit comments

Comments
 (0)