Skip to content

Stop using `latest` tag for images

Balasankar 'Balu' C requested to merge stop-using-latest-tag into master

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

  1. When build_if_needed is called
    1. We check if we actually need to build the image. During this, image gets pulled, if present.
    2. If not present, image gets built and tagged with CONTAINER_VERSION, and pushed.
  2. When push_tags is called
    1. If a version has been passed, we use that.
      1. 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.
      2. 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.
    2. If no version has been specified
      1. If on a tag pipeline, we use a trimmed form of the tag. This contributes towards number 5 in the above table.
      2. 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.
Edited by Balasankar 'Balu' C

Merge request reports