[CNG] [CI] Push mirror images on tag/default branch
What does this MR do?
- Removes
tag_and_push_mirror
- Updates
tag_and_push
to consider a second argument that will be used as the mirror image name if defined - Updates GitLab CI to pass in the second argument to
tag_and_push
so the mirror image is pushed in all conditions (including if on a tag or the default branch)
Related issues
Closes gitlab-org/charts/gitlab#2837 (closed)
Related to gitlab-org/gitlab#337638 (closed)
Testing
Confirming that mirrored image is pushed as expected:
-
https://gitlab.com/gitlab-org/build/CNG/-/jobs/1474786799#L906
$ push_tags $GITLAB_REF_SLUG ${CI_JOB_NAME/toolbox/task-runner} The push refers to repository [registry.gitlab.com/gitlab-org/build/cng/gitlab-task-runner-ce]
-
https://gitlab.com/gitlab-org/build/CNG/-/jobs/1474786797#L947
$ push_tags $GITLAB_REF_SLUG${IMAGE_TAG_EXT} ${CI_JOB_NAME/toolbox/task-runner} The push refers to repository [registry.gitlab.com/gitlab-org/build/cng/gitlab-task-runner-ee]
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion
Required
-
Merge Request Title, and Description are up to date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline on GitLab.com
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes -
Documentation created/updated -
Integration tests added to GitLab QA -
The impact any change in container size has should be evaluated
Closes #2837
Edited by Jason Plum