3838 type : boolean
3939 required : false
4040 default : false
41+ runner_env :
42+ description : Which cloud to run on?
43+ type : choice
44+ default : SMS Lab
45+ options :
46+ - SMS Lab
47+ - Leafcloud
4148
4249env :
4350 ANSIBLE_FORCE_COLOR : True
@@ -82,29 +89,42 @@ jobs:
8289 # Dynamically define job matrix.
8390 # We need a separate matrix entry for each distribution, when the relevant input is true.
8491 # https://stackoverflow.com/questions/65384420/how-do-i-make-a-github-action-matrix-element-conditional
92+ # NOTE(bbezak): Both amd64 and aarch64 need to be built in a single workflow to create a multi-architecture manifest.
93+ # For now include only RL9 in aarch64
8594 - name : Generate build matrix
8695 id : set-matrix
8796 run : |
88- comma=""
89- echo -n "matrix={\"distro\": [" >> $GITHUB_OUTPUT
97+ output="{'distro': ["
9098 if [[ ${{ inputs.rocky-linux-9 }} == 'true' ]]; then
91- echo -n "$comma\" rocky\"" >> $GITHUB_OUTPUT
92- comma=", "
99+ output+="{'name': ' rocky', 'release': 9, 'arch': 'amd64'},"
100+ output+="{'name': 'rocky', 'release': 9, 'arch': 'aarch64'}, "
93101 fi
94102 if [[ ${{ inputs.ubuntu-jammy }} == 'true' ]]; then
95- echo -n "$comma\"ubuntu\"" >> $GITHUB_OUTPUT
96- comma=", "
103+ output+="{'name': 'ubuntu', 'release': 'jammy', 'arch': 'amd64'},"
97104 fi
98- echo "]}" >> $GITHUB_OUTPUT
105+ if [[ ${{ inputs.ubuntu-noble }} == 'true' ]]; then
106+ output+="{'name': 'ubuntu', 'release': 'noble', 'arch': 'amd64'},"
107+ fi
108+ # remove trailing comma
109+ output="${output%,}"
110+ output+="]}"
111+ echo "matrix=$output" >> $GITHUB_OUTPUT
99112
100113 - name : Display container datetime tag
101114 run : |
102115 echo "${{ steps.datetime_tag.outputs.datetime_tag }}"
103116
117+ runner-selection :
118+ uses : ./.github/workflows/runner-selector.yml
119+ with :
120+ runner_env : ${{ inputs.runner_env }}
121+
104122 container-image-build :
105123 name : Build Kolla container images
106124 if : github.repository == 'stackhpc/stackhpc-kayobe-config'
107- runs-on : arc-skc-container-image-builder-runner
125+ runs-on : ${{ matrix.distro.arch == 'aarch64'
126+ && fromJson('["self-hosted","sms","arm64"]')
127+ || needs.runner-selection.outputs.runner_name_container_image_build }}
108128 timeout-minutes : 720
109129 permissions : {}
110130 strategy :
@@ -144,7 +164,7 @@ jobs:
144164
145165 - name : Install Trivy
146166 run : |
147- curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b /usr/local/bin v0.49.0
167+ curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b /usr/local/bin v0.67.2
148168
149169 - name : Install yq
150170 run : |
@@ -164,7 +184,7 @@ jobs:
164184 - name : Install Docker Python SDK
165185 run : |
166186 sudo pip install docker 'requests<2.32.0'
167-
187+
168188 - name : Get Kolla tag
169189 id : write-kolla-tag
170190 run : echo "kolla-tag=${{ needs.generate-tag.outputs.openstack_release }}-${{ matrix.distro }}-${{ matrix.distro == 'rocky' && '9' || 'jammy' }}-${{ needs.generate-tag.outputs.datetime_tag }}" >> $GITHUB_OUTPUT
0 commit comments