9696 # https://stackoverflow.com/questions/65384420/how-do-i-make-a-github-action-matrix-element-conditional
9797 # NOTE(bbezak): Both amd64 and aarch64 need to be built in a single workflow to create a multi-architecture manifest.
9898 # For now include only RL9 in aarch64
99+ # NOTE(bbezak): Both amd64 and aarch64 need to be built in a single workflow to create a multi-architecture manifest.
100+ # For now include only RL9 in aarch64
99101 - name : Generate build matrix
100102 id : set-matrix
101103 run : |
@@ -104,8 +106,12 @@ jobs:
104106 output+="{'name': 'rocky', 'release': 9, 'arch': 'amd64'},"
105107 output+="{'name': 'rocky', 'release': 9, 'arch': 'aarch64'},"
106108 fi
109+ if [[ ${{ inputs.ubuntu-jammy }} == 'true' ]]; then
110+ output+="{'name': 'ubuntu', 'release': 'jammy', 'arch': 'amd64'},"
111+ fi
107112 if [[ ${{ inputs.ubuntu-noble }} == 'true' ]]; then
108113 output+="{'name': 'ubuntu', 'release': 'noble', 'arch': 'amd64'},"
114+ output+="{'name': 'ubuntu', 'release': 'noble', 'arch': 'amd64'},"
109115 fi
110116 # remove trailing comma
111117 output="${output%,}"
@@ -124,6 +130,9 @@ jobs:
124130 container-image-build :
125131 name : Build Kolla container images
126132 if : github.repository == 'stackhpc/stackhpc-kayobe-config'
133+ runs-on : ${{ matrix.distro.arch == 'aarch64'
134+ && fromJson('["self-hosted","sms","arm64"]')
135+ || needs.runner-selection.outputs.runner_name_container_image_build }}
127136 runs-on : ${{ matrix.distro.arch == 'aarch64'
128137 && fromJson('["self-hosted","sms","arm64"]')
129138 || needs.runner-selection.outputs.runner_name_container_image_build }}
@@ -139,6 +148,9 @@ jobs:
139148 - name : Purge workspace
140149 run : sudo rm -rf "$GITHUB_WORKSPACE"/*
141150
151+ - name : Purge workspace
152+ run : sudo rm -rf "$GITHUB_WORKSPACE"/*
153+
142154 - name : Install package dependencies
143155 run : |
144156 sudo apt update
@@ -161,6 +173,8 @@ jobs:
161173 run : |
162174 ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
163175 curl -sL "https://github.com/mikefarah/yq/releases/download/v4.42.1/yq_linux_${ARCH}.tar.gz" | tar xz && sudo mv yq_linux_${ARCH} /usr/bin/yq
176+ ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
177+ curl -sL "https://github.com/mikefarah/yq/releases/download/v4.42.1/yq_linux_${ARCH}.tar.gz" | tar xz && sudo mv yq_linux_${ARCH} /usr/bin/yq
164178
165179 - name : Install Kayobe
166180 run : |
@@ -201,26 +215,33 @@ jobs:
201215 if [[ "${{ matrix.distro.arch }}" == 'aarch64' ]]; then
202216 args="$args -e kolla_base_arch=${{ matrix.distro.arch }}"
203217 fi
218+ if [[ "${{ matrix.distro.arch }}" == 'aarch64' ]]; then
219+ args="$args -e kolla_base_arch=${{ matrix.distro.arch }}"
220+ fi
204221 args="$args -e kolla_base_distro=${{ matrix.distro.name }}"
205222 args="$args -e kolla_base_distro_version=${{ matrix.distro.release }}"
206223 if [[ "${{ matrix.distro.name }}" == 'rocky' ]]; then
207224 args="$args -e kolla_tag=${{ steps.write-kolla-tag.outputs.kolla-tag }}-${{ matrix.distro.arch }}"
208225 else
209226 args="$args -e kolla_tag=${{ steps.write-kolla-tag.outputs.kolla-tag }}"
210227 fi
228+ if [[ "${{ matrix.distro.name }}" == 'rocky' ]]; then
229+ args="$args -e kolla_tag=${{ steps.write-kolla-tag.outputs.kolla-tag }}-${{ matrix.distro.arch }}"
230+ else
231+ args="$args -e kolla_tag=${{ steps.write-kolla-tag.outputs.kolla-tag }}"
232+ fi
211233 args="$args -e stackhpc_repo_mirror_auth_proxy_enabled=true"
212234 args="$args -e kolla_build_log_path=$GITHUB_WORKSPACE/image-build-logs/kolla-build-overcloud.log"
213235 args="$args -e base_path=$GITHUB_WORKSPACE/opt/kayobe"
214- # NOTE: We override pulp_auth_proxy_conf_path to a path shared by the
215- # runner and dind containers.
216- args="$args -e pulp_auth_proxy_conf_path=/home/runner/_work/pulp_proxy"
217236 source venvs/kayobe/bin/activate &&
218237 source src/kayobe-config/kayobe-env --environment ci-builder &&
219238 kayobe overcloud container image build $args
220239 env :
221240 KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
222241 if : inputs.overcloud
223242
243+ - name : Copy build configs to output directory
244+ run : sudo cp -rnL "$GITHUB_WORKSPACE/opt/kayobe/etc/kolla/"* image-build-logs/
224245 - name : Copy build configs to output directory
225246 run : sudo cp -rnL "$GITHUB_WORKSPACE/opt/kayobe/etc/kolla/"* image-build-logs/
226247 if : inputs.overcloud
@@ -239,13 +260,16 @@ jobs:
239260 env :
240261 KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
241262 if : inputs.seed && matrix.distro.arch == 'amd64'
263+ if : inputs.seed && matrix.distro.arch == 'amd64'
242264
243265 - name : Copy seed container image build logs to output directory
244266 run : sudo mv /var/log/kolla-build.log image-build-logs/kolla-build-seed.log
245267 if : inputs.seed && matrix.distro.arch == 'amd64'
268+ if : inputs.seed && matrix.distro.arch == 'amd64'
246269
247270 - name : Get built container images
248271 run : docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/*:${{ steps.write-kolla-tag.outputs.kolla-tag }}*" > ${{ matrix.distro.name }}-${{ matrix.distro.release }}-container-images
272+ run : docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/*:${{ steps.write-kolla-tag.outputs.kolla-tag }}*" > ${{ matrix.distro.name }}-${{ matrix.distro.release }}-container-images
249273
250274 - name : Fail if no images have been built
251275 run : if [ $(wc -l < ${{ matrix.distro.name }}-${{ matrix.distro.release }}-container-images) -le 1 ]; then exit 1; fi
@@ -306,6 +330,7 @@ jobs:
306330 - name : Upload output artifact
307331 uses : actions/upload-artifact@v4
308332 with :
333+ name : ${{ matrix.distro.name }}-${{ matrix.distro.release }}-${{ matrix.distro.arch }}-logs
309334 name : ${{ matrix.distro.name }}-${{ matrix.distro.release }}-${{ matrix.distro.arch }}-logs
310335 path : image-build-logs
311336 retention-days : 7
0 commit comments