@@ -213,31 +213,32 @@ jobs:
213
213
if : inputs.seed
214
214
215
215
- name : Get built container images
216
- run : |
217
- docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/${{ matrix.distro }}-*:${{ needs.generate-tag.outputs.kolla_tag }}" > ${{ matrix.distro }}-container-images
216
+ run : docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/${{ matrix.distro }}-*:${{ needs.generate-tag.outputs.kolla_tag }}" > ${{ matrix.distro }}-container-images
218
217
219
218
- name : Fail if no images have been built
220
219
run : if [ $(wc -l < ${{ matrix.distro }}-container-images) -le 1 ]; then exit 1; fi
221
220
222
221
- name : Scan built container images
223
- run : |
224
- src/kayobe-config/tools/scan-images.sh ${{ matrix.distro }} ${{ needs.generate-tag.outputs.kolla_tag }}
222
+ run : src/kayobe-config/tools/scan-images.sh ${{ matrix.distro }} ${{ needs.generate-tag.outputs.kolla_tag }}
223
+
224
+ - name : Move image scan logs to output artifact
225
+ run : mv image-scan-output image-build-logs/image-scan-output
225
226
226
227
- name : Fail if no images have passed scanning
227
- run : if [ $(wc -l < image-scan-output/clean-images.txt) -le 0 ]; then exit 1; fi
228
+ run : if [ $(wc -l < image-build-logs/image- scan-output/clean-images.txt) -le 0 ]; then exit 1; fi
228
229
if : ${{ !inputs.push-dirty }}
229
230
230
231
- name : Copy clean images to push-attempt-images list
231
- run : cp image-scan-output/clean-images.txt image-scan-output /push-attempt-images.txt
232
+ run : cp image-build-logs/image- scan-output/clean-images.txt image-build-logs /push-attempt-images.txt
232
233
233
234
- name : Append dirty images to push list
234
235
run : |
235
- cat image-scan-output/dirty-images.txt >> image-scan-output /push-attempt-images.txt
236
+ cat image-build-logs/image- scan-output/dirty-images.txt >> image-build-logs /push-attempt-images.txt
236
237
if : inputs.push-dirty
237
238
238
239
- name : Push images
239
240
run : |
240
- touch image-scan-output /push-failed-images.txt
241
+ touch image-build-logs /push-failed-images.txt
241
242
source venvs/kayobe/bin/activate &&
242
243
source src/kayobe-config/kayobe-env --environment ci-builder &&
243
244
kayobe playbook run ${KAYOBE_CONFIG_PATH}/ansible/docker-registry-login.yml &&
@@ -250,14 +251,13 @@ jobs:
250
251
break
251
252
elif $i == 5; then
252
253
echo "Failed to push $image"
253
- echo $image >> image-scan-output /push-failed-images.txt
254
+ echo $image >> image-build-logs /push-failed-images.txt
254
255
else
255
256
echo "Failed on retry $i"
256
257
sleep 5
257
258
fi;
258
259
done
259
- done < image-scan-output/push-attempt-images.txt &&
260
- mv image-scan-output image-build-logs/image-scan-output
260
+ done < image-build-logs/push-attempt-images.txt
261
261
shell : bash
262
262
env :
263
263
KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
0 commit comments