Skip to content

Commit 0276573

Browse files
committed
update packer workflows for new packer config
1 parent f9f1105 commit 0276573

File tree

4 files changed

+25
-48
lines changed

4 files changed

+25
-48
lines changed

.github/workflows/doca.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
-on-error=${{ vars.PACKER_ON_ERROR }} \
9292
-var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
9393
-var "source_image_name=${{ matrix.build.source_image_name }}" \
94-
-var "image_name=openhpc-doca" \
94+
-var "image_name=openhpc-doca-${{ matrix.build.label }}" \
9595
-var "inventory_groups=doca" \
9696
openstack.pkr.hcl
9797
@@ -110,7 +110,7 @@ jobs:
110110
- name: Upload manifest artifact
111111
uses: actions/upload-artifact@v4
112112
with:
113-
name: image-details-openhpc-${{ matrix.label }}
113+
name: image-details-${{ matrix.build.label }}
114114
path: |
115115
./image-id.txt
116116
./image-name.txt

.github/workflows/fatimage.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,21 @@ jobs:
1515
openstack:
1616
name: openstack-imagebuild
1717
concurrency:
18-
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os_version }}-${{ matrix.build }} # to branch/PR + OS + build
18+
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.build.label }} # to branch/PR + OS
1919
cancel-in-progress: true
2020
runs-on: ubuntu-22.04
2121
strategy:
2222
fail-fast: false # allow other matrix jobs to continue even if one fails
2323
matrix: # build RL8, RL9
24-
os_version:
25-
- RL8
26-
- RL9
2724
build:
28-
- openstack.openhpc
25+
- label: RL8
26+
source_image_name: rocky-latest-RL8
27+
- label: RL9
28+
source_image_name: rocky-latest-RL9
2929
env:
3030
ANSIBLE_FORCE_COLOR: True
3131
OS_CLOUD: openstack
3232
CI_CLOUD: ${{ github.event.inputs.ci_cloud }}
33-
SOURCE_IMAGES_MAP: |
34-
{
35-
"RL8": {
36-
"openstack.openhpc": "rocky-latest-RL8"
37-
},
38-
"RL9": {
39-
"openstack.openhpc": "rocky-latest-RL9"
40-
}
41-
}
4233
ARK_PASSWORD: ${{ secrets.ARK_PASSWORD }}
4334

4435
steps:
@@ -85,13 +76,11 @@ jobs:
8576
8677
PACKER_LOG=1 packer build \
8778
-on-error=${{ vars.PACKER_ON_ERROR }} \
88-
-only=${{ matrix.build }} \
8979
-var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
90-
-var "source_image_name=${{ env.SOURCE_IMAGE }}" \
80+
-var "source_image_name=${{ matrix.build.source_image_name }}" \
81+
-var "image_name=openhpc-${{ matrix.build.label }}" \
82+
-var "inventory_groups=control,compute,login" \
9183
openstack.pkr.hcl
92-
env:
93-
PKR_VAR_os_version: ${{ matrix.os_version }}
94-
SOURCE_IMAGE: ${{ fromJSON(env.SOURCE_IMAGES_MAP)[matrix.os_version][matrix.build] }}
9584
9685
- name: Get created image names from manifest
9786
id: manifest
@@ -108,7 +97,7 @@ jobs:
10897
- name: Upload manifest artifact
10998
uses: actions/upload-artifact@v4
11099
with:
111-
name: image-details-${{ matrix.build }}-${{ matrix.os_version }}
100+
name: image-details-${{ matrix.build.label }}
112101
path: |
113102
./image-id.txt
114103
./image-name.txt

.github/workflows/nightlybuild.yml

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,27 @@ on:
1111
- SMS
1212
- ARCUS
1313
schedule:
14-
- cron: '0 0 * * *' # Run at midnight
14+
- cron: '0 0 * * *' # Run at midnight on default branch
1515

1616
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.build.label }} # to branch/PR + OS
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: # build RL8, RL9
26-
os_version:
27-
- RL8
28-
- RL9
2926
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
3131
env:
3232
ANSIBLE_FORCE_COLOR: True
3333
OS_CLOUD: openstack
3434
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-
}
4035
ARK_PASSWORD: ${{ secrets.ARK_PASSWORD }}
4136

4237
steps:
@@ -83,15 +78,12 @@ jobs:
8378
8479
PACKER_LOG=1 packer build \
8580
-on-error=${{ vars.PACKER_ON_ERROR }} \
86-
-only=${{ matrix.build }} \
8781
-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" \
8985
openstack.pkr.hcl
9086
91-
env:
92-
PKR_VAR_os_version: ${{ matrix.os_version }}
93-
SOURCE_IMAGE: ${{ fromJSON(env.SOURCE_IMAGES_MAP)[matrix.os_version] }}
94-
9587
- name: Get created image names from manifest
9688
id: manifest
9789
run: |
@@ -125,7 +117,7 @@ jobs:
125117
name: upload-nightly-targets
126118
needs: openstack
127119
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 }}
129121
cancel-in-progress: true
130122
runs-on: ubuntu-22.04
131123
strategy:
@@ -135,18 +127,16 @@ jobs:
135127
- LEAFCLOUD
136128
- SMS
137129
- ARCUS
138-
os_version:
139-
- RL8
140-
- RL9
141-
image:
142-
- rocky-latest
130+
build:
131+
- label: RL8
132+
- label: RL9
143133
exclude:
144134
- target_cloud: LEAFCLOUD
145135
env:
146136
OS_CLOUD: openstack
147137
SOURCE_CLOUD: ${{ github.event.inputs.ci_cloud || vars.CI_CLOUD }}
148138
TARGET_CLOUD: ${{ matrix.target_cloud }}
149-
IMAGE_NAME: "${{ matrix.image }}-${{ matrix.os_version }}"
139+
IMAGE_NAME: "rocky-latest-${{ matrix.build.label }}"
150140
steps:
151141
- uses: actions/checkout@v2
152142

packer/openstack.pkr.hcl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ variable "inventory_groups" {
136136
type = string
137137
description = "Comma-separated list of additional inventory groups (other than 'builder') to add build VM to. Default is none."
138138
default = ""
139-
# rocky-latest = ["update"] # TODO: fix this in workflow
140-
# openhpc = ["control", "compute", "login"]
141139
}
142140

143141
variable "image_name" {

0 commit comments

Comments
 (0)