Skip to content

Fix silent docker images build failure and retry buildx

Georgi N. Georgiev requested to merge fix-silent-docker-images-build-failure into main

What does this MR do?

Read #29490 for context.

This MR is a temporary solution for failing s390x image builds. I spent a considerable time on !3771 without coming to a decisive solution. We might end up having to use separate runners for s390x. For now, we can restart the buildx builds a few times. Subsequent builds will be cached so these restarts won't be costly. In addition to that we now correctly return the exit code of the build.

Why was this MR needed?

What's the best way to test this MR?

Docker images jobs should pass and if there's an error you should see Running buildx build try #3 out of 5 or similar number.

https://gitlab.com/gitlab-org/gitlab-runner/-/jobs/3479069609

You can also run the invalid command IMAGE_FLAVOR=alpine3.15 TARGET_ARCHS=amd64 PUBLISH_IMAGES=true CI_REGISTRY=registry.gitlab.com CI_REGISTRY_IMAGE=registry.gitlab.com/gitlab-runner make release_docker_images locally which will print an error and you should see the correct exit code rather than 0.

Make sure you have all the deb and binary dependencies you are asked of from the script. The goal is to have buildx fail, no something else in the script.

What are the relevant issue numbers?

Related to #29490

Edited by Georgi N. Georgiev

Merge request reports