Skip to content

Commit 1d2213b

Browse files
committed
fixup matrix for changes
1 parent 0dc6549 commit 1d2213b

File tree

3 files changed

+11
-17
lines changed

3 files changed

+11
-17
lines changed

.github/workflows/doca.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
openstack:
2929
name: openstack-docabuild
3030
concurrency:
31-
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.build.label }} # to branch/PR + OS
31+
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.build.image_name }} # to branch/PR + OS
3232
cancel-in-progress: true
3333
runs-on: ubuntu-22.04
3434
strategy:
@@ -122,7 +122,7 @@ jobs:
122122
- name: Upload manifest artifact
123123
uses: actions/upload-artifact@v4
124124
with:
125-
name: image-details-${{ matrix.build.label }}
125+
name: image-details-${{ matrix.build.image_name }}
126126
path: |
127127
./image-id.txt
128128
./image-name.txt

.github/workflows/fatimage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
openstack:
1616
name: openstack-imagebuild
1717
concurrency:
18-
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.build.label }} # to branch/PR + OS
18+
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.build.image_name }} # to branch/PR + OS
1919
cancel-in-progress: true
2020
runs-on: ubuntu-22.04
2121
strategy:

.github/workflows/nightlybuild.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
openstack:
1818
name: openstack-imagebuild
1919
concurrency:
20-
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.build.label }} # to branch/PR + OS
20+
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.build.image_name }} # to branch/PR + OS
2121
cancel-in-progress: true
2222
runs-on: ubuntu-22.04
2323
strategy:
@@ -130,15 +130,14 @@ jobs:
130130
- SMS
131131
- ARCUS
132132
build:
133-
- label: RL8
134-
- label: RL9
133+
- image_name: rocky-latest-RL8
134+
- image_name: rocky-latest-RL9
135135
exclude:
136136
- target_cloud: LEAFCLOUD
137137
env:
138138
OS_CLOUD: openstack
139139
SOURCE_CLOUD: ${{ github.event.inputs.ci_cloud || vars.CI_CLOUD }}
140140
TARGET_CLOUD: ${{ matrix.target_cloud }}
141-
IMAGE_NAME: "rocky-latest-${{ matrix.build.label }}"
142141
steps:
143142
- uses: actions/checkout@v2
144143

@@ -153,42 +152,37 @@ jobs:
153152
. venv/bin/activate
154153
pip install -U pip
155154
pip install $(grep -o 'python-openstackclient[><=0-9\.]*' requirements.txt)
156-
shell: bash
157155
158156
- name: Write clouds.yaml
159157
run: |
160158
mkdir -p ~/.config/openstack/
161159
echo "${{ secrets[format('{0}_CLOUDS_YAML', env.SOURCE_CLOUD)] }}" > ~/.config/openstack/source_clouds.yaml
162160
echo "${{ secrets[format('{0}_CLOUDS_YAML', env.TARGET_CLOUD)] }}" > ~/.config/openstack/target_clouds.yaml
163-
shell: bash
164161
165162
- name: Download source image
166163
run: |
167164
. venv/bin/activate
168165
export OS_CLIENT_CONFIG_FILE=~/.config/openstack/source_clouds.yaml
169-
openstack image save --file ${{ env.IMAGE_NAME }} ${{ env.IMAGE_NAME }}
170-
shell: bash
166+
openstack image save --file ${{ matrix.build.image_name }} ${{ matrix.build.image_name }}
171167
172168
- name: Upload to target cloud
173169
run: |
174170
. venv/bin/activate
175171
export OS_CLIENT_CONFIG_FILE=~/.config/openstack/target_clouds.yaml
176172
177-
openstack image create "${{ env.IMAGE_NAME }}" \
178-
--file "${{ env.IMAGE_NAME }}" \
173+
openstack image create "${{ matrix.build.image_name }}" \
174+
--file "${{ matrix.build.image_name }}" \
179175
--disk-format qcow2 \
180-
shell: bash
181176
182177
- name: Delete old latest image from target cloud
183178
run: |
184179
. venv/bin/activate
185180
export OS_CLIENT_CONFIG_FILE=~/.config/openstack/target_clouds.yaml
186181
187-
IMAGE_COUNT=$(openstack image list --name ${{ env.IMAGE_NAME }} -f value -c ID | wc -l)
182+
IMAGE_COUNT=$(openstack image list --name ${{ matrix.build.image_name }} -f value -c ID | wc -l)
188183
if [ "$IMAGE_COUNT" -gt 1 ]; then
189-
OLD_IMAGE_ID=$(openstack image list --sort created_at:asc --name "${{ env.IMAGE_NAME }}" -f value -c ID | head -n 1)
184+
OLD_IMAGE_ID=$(openstack image list --sort created_at:asc --name "${{ matrix.build.image_name }}" -f value -c ID | head -n 1)
190185
openstack image delete "$OLD_IMAGE_ID"
191186
else
192187
echo "Only one image exists, skipping deletion."
193188
fi
194-
shell: bash

0 commit comments

Comments
 (0)