Push image on registry during release stage only when enabled
What does this MR do?
This MR allows images to be pushed on the registry only if enabled
Why was this MR needed?
At the moment, the GitLab Runner images published on the AWS ECR registry have been deactivated (PUSH_TO_ECR_PUBLIC: false). However, the CI still tries to push to images resulting in the failure of the related job as it can be seen in the Release
stage of those pipelines (bleeding edge helper docker images jobs):
- https://gitlab.com/gitlab-org/gitlab-runner/-/pipelines/588444776
- https://gitlab.com/gitlab-org/gitlab-runner/-/pipelines/588395208
This MR fixes the issue so the pipeline doesn't fail anymore.
What's the best way to test this MR?
To test this MR, the following variables have been updated in the Release
stage for the development helper docker images
jobs.
-
PUBLISH_IMAGES
set totrue
-
PUSH_TO_ECR_PUBLIC
kept tofalse
PS: The error wasn't occurring in the development helper docker images
jobs because of PUBLISH_IMAGES
set to false
Test pipeline and related commit
In the following logs, we can see that there is no failure caused by an attempt to push on AWS ECR
- https://gitlab.com/gitlab-org/gitlab-runner/-/jobs/2726969516#L320
- https://gitlab.com/gitlab-org/gitlab-runner/-/jobs/2726969517#L307
What are the relevant issue numbers?
close #29170 (closed)