Skip to content

Add major version tag#8026

Merged
roidelapluie merged 1 commit intoprometheus:masterfrom
vears91:docker-tag-v2
Oct 22, 2020
Merged

Add major version tag#8026
roidelapluie merged 1 commit intoprometheus:masterfrom
vears91:docker-tag-v2

Conversation

@vears91
Copy link
Copy Markdown
Contributor

@vears91 vears91 commented Oct 7, 2020

When the latest tag is added, also add a tag for the major version
when the version tag matches the latest release defined in VERSION.

Closes #7824

@roidelapluie
Copy link
Copy Markdown
Member

roidelapluie commented Oct 7, 2020

Can we check that release candidates do not get this tag ? @SuperQ @simonpasquier WDYT?

@SuperQ
Copy link
Copy Markdown
Member

SuperQ commented Oct 8, 2020

@roidelapluie We control the make docker-tag-latest from the CircleCI configuration, which doesn't tag latest on pre-releases.

When the latest tag is added, also add a tag for the major version
when the version tag matches the latest release defined in VERSION.

Signed-off-by: Victor Araujo <vear91@gmail.com>
Copy link
Copy Markdown
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

@roidelapluie roidelapluie merged commit 74775d7 into prometheus:master Oct 22, 2020
@roidelapluie
Copy link
Copy Markdown
Member

Thanks!

@ozboss
Copy link
Copy Markdown

ozboss commented Jan 3, 2021

Is this available yet? I tried ":2" and ":v2" both did not work.

@roidelapluie
Copy link
Copy Markdown
Member

I missed that we do not push the image, and that we also tag the RC releases with this(which we should not)

roidelapluie added a commit to roidelapluie/prometheus that referenced this pull request Jan 19, 2026
In commit 74775d7 "Add major version tag (prometheus#8026)" from 2020, the
docker-tag-latest target was updated to create major version tags
(v2, v3, etc.) but these tags were never actually pushed to the
registry. They existed locally only after tagging but were never
published.

This commit fixes the issue by:
- Adding logic to docker-publish to push major version tags when
  DOCKER_IMAGE_TAG="latest" (triggered by promci during releases)
- Adding logic to docker-manifest to create major version manifests
  when DOCKER_IMAGE_TAG="latest"

Pre-release filtering is handled at the promci level, where the regex
check ^v[0-9]+(\.[0-9]+){2}$ already ensures only stable releases
trigger the "latest" tagging workflow.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prometheus v2 docker tag

4 participants