Skip to content

Commit

Permalink
define builds entirely via matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
sjpb committed Dec 11, 2024
1 parent 0276573 commit 5fbed66
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/fatimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ jobs:
fail-fast: false # allow other matrix jobs to continue even if one fails
matrix: # build RL8, RL9
build:
- label: RL8
- image_name: openhpc-RL8
source_image_name: rocky-latest-RL8
- label: RL9
inventory_groups: control,compute,login
- image_name: openhpc-RL9
source_image_name: rocky-latest-RL9
inventory_groups: control,compute,login
env:
ANSIBLE_FORCE_COLOR: True
OS_CLOUD: openstack
Expand Down Expand Up @@ -78,8 +80,8 @@ jobs:
-on-error=${{ vars.PACKER_ON_ERROR }} \
-var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
-var "source_image_name=${{ matrix.build.source_image_name }}" \
-var "image_name=openhpc-${{ matrix.build.label }}" \
-var "inventory_groups=control,compute,login" \
-var "image_name=${{ matrix.build.image_name }}" \
-var "inventory_groups=${{ matrix.build.inventory_groups }}" \
openstack.pkr.hcl
- name: Get created image names from manifest
Expand All @@ -97,7 +99,7 @@ jobs:
- name: Upload manifest artifact
uses: actions/upload-artifact@v4
with:
name: image-details-${{ matrix.build.label }}
name: image-details-${{ matrix.build.image_name }}
path: |
./image-id.txt
./image-name.txt
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/nightlybuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ jobs:
fail-fast: false # allow other matrix jobs to continue even if one fails
matrix: # build RL8, RL9
build:
- label: RL8
- image_name: rocky-latest-RL8
source_image_name: Rocky-8-GenericCloud-Base-8.9-20231119.0.x86_64.qcow2
- label: RL9
inventory_groups: update
- image_name: rocky-latest-RL9
source_image_name: Rocky-9-GenericCloud-Base-9.4-20240523.0.x86_64.qcow2
inventory_groups: update
env:
ANSIBLE_FORCE_COLOR: True
OS_CLOUD: openstack
Expand Down Expand Up @@ -80,8 +82,8 @@ jobs:
-on-error=${{ vars.PACKER_ON_ERROR }} \
-var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
-var "source_image_name=${{ matrix.build.source_image_name }}" \
-var "image_name=rocky-latest-${{ matrix.build.label }}" \
-var "inventory_groups=update" \
-var "image_name=${{ matrix.build.image_name }}" \
-var "inventory_groups=${{ matrix.build.inventory_groups }}" \
openstack.pkr.hcl
- name: Get created image names from manifest
Expand Down

0 comments on commit 5fbed66

Please sign in to comment.