Skip to content

Commit 7cb3b42

Browse files
committed
Build previous release too
1 parent 209d29d commit 7cb3b42

File tree

3 files changed

+30
-52
lines changed

3 files changed

+30
-52
lines changed

.github/workflows/stackhpc-all-in-one.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
description: Kayobe container image
1212
type: string
1313
required: true
14+
previous_kayobe_image:
15+
description: Previous Kayobe container image
16+
type: string
17+
required: true
1418
os_distribution:
1519
description: Host OS distribution
1620
type: string
@@ -81,7 +85,7 @@ jobs:
8185
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
8286
KAYOBE_IMAGE: ${{ inputs.kayobe_image }}
8387
# NOTE(upgrade): Reference the PREVIOUS release here.
84-
PREVIOUS_KAYOBE_IMAGE: ghcr.io/stackhpc/stackhpc-kayobe-config:stackhpc-2023.1
88+
PREVIOUS_KAYOBE_IMAGE: ${{ inputs.previous_kayobe_image }}
8589
# NOTE(upgrade): Reference the PREVIOUS release branch here.
8690
PREVIOUS_BRANCH: rabbitmq-multiple-versions
8791
steps:

.github/workflows/stackhpc-build-kayobe-image.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ on:
2525
type: string
2626
required: false
2727
default: "rockylinux:9"
28+
kayobe_config_branch:
29+
type: string
30+
required: false
2831
if:
2932
description: Whether to run the workflow (workaround for required status checks issue)
3033
type: boolean
@@ -53,6 +56,7 @@ jobs:
5356
- name: Checkout kayobe config
5457
uses: actions/checkout@v4
5558
with:
59+
ref: ${{ inputs.kayobe_config_branch || github.ref }}
5660
submodules: true
5761

5862
- name: Log in to the Container registry
@@ -96,5 +100,5 @@ jobs:
96100
KAYOBE_USER_UID=1001
97101
KAYOBE_USER_GID=1001
98102
push: true
99-
tags: ${{ steps.meta.outputs.tags }}
103+
tags: ${{ steps.meta.outputs.tags }}${{ inputs.kayobe_config_branch }}
100104
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/stackhpc-pull-request.yml

Lines changed: 20 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,16 @@ jobs:
7777
if: ${{ needs.check-changes.outputs.aio == 'true' }}
7878
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
7979

80+
build-kayobe-image-previous:
81+
name: Build Kayobe Image for previous release
82+
needs:
83+
- check-changes
84+
uses: ./.github/workflows/stackhpc-build-kayobe-image.yml
85+
with:
86+
if: ${{ needs.check-changes.outputs.aio == 'true' }}
87+
kayobe_config_branch: rabbitmq-multiple-versions # Note: this would be stackhpc/2023.1 in a proper setup
88+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
89+
8090
check-tags:
8191
name: Check container image tags
8292
needs:
@@ -89,52 +99,30 @@ jobs:
8999
secrets: inherit
90100
if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
91101

92-
# Test two upgrade scenarios: Ubuntu Jammy OVS and Rocky 9 OVN.
93-
94-
all-in-one-upgrade-ubuntu-jammy-ovs:
95-
name: aio upgrade (Ubuntu Jammy OVS)
102+
check-tags-previous:
103+
name: Check container image tags
96104
needs:
97105
- check-changes
98-
- build-kayobe-image
99-
uses: ./.github/workflows/stackhpc-all-in-one.yml
106+
- build-kayobe-image-previous
107+
uses: ./.github/workflows/stackhpc-check-tags.yml
100108
with:
101-
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
102-
os_distribution: ubuntu
103-
os_release: jammy
104-
ssh_username: ubuntu
105-
neutron_plugin: ovs
106-
OS_CLOUD: openstack
107-
if: ${{ needs.check-changes.outputs.aio == 'true' }}
108-
upgrade: true
109+
kayobe_image: ${{ needs.build-kayobe-image-previous.outputs.kayobe_image }}
110+
if: ${{ needs.check-changes.outputs.check-tags == 'true' }}
109111
secrets: inherit
110112
if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
111113

112-
all-in-one-upgrade-rocky-9-ovn:
113-
name: aio upgrade (Rocky 9 OVN)
114-
needs:
115-
- check-changes
116-
- build-kayobe-image
117-
uses: ./.github/workflows/stackhpc-all-in-one.yml
118-
with:
119-
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
120-
os_distribution: rocky
121-
os_release: "9"
122-
ssh_username: cloud-user
123-
neutron_plugin: ovn
124-
OS_CLOUD: openstack
125-
if: ${{ needs.check-changes.outputs.aio == 'true' }}
126-
upgrade: true
127-
secrets: inherit
128-
if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
114+
# Test two upgrade scenarios: Ubuntu Jammy OVS and Rocky 9 OVN.
129115

130116
all-in-one-upgrade-ubuntu-jammy-ovn:
131-
name: aio upgrade (Ubuntu Jammy OVS)
117+
name: aio upgrade (Ubuntu Jammy OVN)
132118
needs:
133119
- check-changes
134120
- build-kayobe-image
121+
- build-kayobe-image-previous
135122
uses: ./.github/workflows/stackhpc-all-in-one.yml
136123
with:
137124
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
125+
previous_kayobe_image: ${{ needs.build-kayobe-image-previous.outputs.kayobe_image }}
138126
os_distribution: ubuntu
139127
os_release: jammy
140128
ssh_username: ubuntu
@@ -144,21 +132,3 @@ jobs:
144132
upgrade: true
145133
secrets: inherit
146134
if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
147-
148-
all-in-one-upgrade-rocky-9-ovs:
149-
name: aio upgrade (Rocky 9 OVN)
150-
needs:
151-
- check-changes
152-
- build-kayobe-image
153-
uses: ./.github/workflows/stackhpc-all-in-one.yml
154-
with:
155-
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
156-
os_distribution: rocky
157-
os_release: "9"
158-
ssh_username: cloud-user
159-
neutron_plugin: ovs
160-
OS_CLOUD: openstack
161-
if: ${{ needs.check-changes.outputs.aio == 'true' }}
162-
upgrade: true
163-
secrets: inherit
164-
if: ${{ ! failure() && ! cancelled() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}

0 commit comments

Comments
 (0)