Stop using `latest` tag for images
Closes: gitlab-org/charts/gitlab#1201 (closed)
What we try to achieve
Sl. No. | git | label |
---|---|---|
1 | master |
master |
2 | 13-2-stable |
13-2-stable |
3 | relocate-bootsnap-cache |
relocate-bootsnap-cache |
4 | fix-13.1-stable |
fix-13-1-stable |
5 | v4.2.1 |
v4.2.1 |
The current logic is
- When
build_if_needed
is called- We check if we actually need to build the image. During this, image gets pulled, if present.
- If not present, image gets built and tagged with
CONTAINER_VERSION
, and pushed.
- When
push_tags
is called- If a version has been passed, we use that.
- If on a tag, we trim the
-ee
or-ubi8
suffix from the specified version, and use the result as image tag and push it. This is a no-op for other components which use different versions (GraphicsMagick, Python, Registry, etc.). This contributes towards number 5 in the above table. - If not, we use the specified version as-is. This is used for versions of GitLab components set on triggered pipelines from Rails side on stable branches.
- If on a tag, we trim the
- If no version has been specified
- If on a tag pipeline, we use a trimmed form of the tag. This contributes towards number 5 in the above table.
- If on a branch pipeline, we use a slug of the branch name. This covers numbers 1, 2, 3, and 4 in the above table.
- If a version has been passed, we use that.
Edited by Balasankar 'Balu' C