-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Align docker-meta with other agents #413
Comments
Aligning on the labels seems easy. Finding alignment on the
|
docker/metadata-action "with.tags" configs currently in useJava: https://github.com/elastic/elastic-otel-java/blob/main/.github/workflows/release-step-3.yml - name: Extract metadata (tags, labels)
id: docker-meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with:
images: ${{ env.DOCKER_IMAGE_NAME }}
tags: |
type=raw,value=${{ env.RELEASE_VERSION }}
type=raw,value=latest,enable=${{ contains(env.LATEST_TAG,env.RELEASE_VERSION) }} .NET: https://github.com/elastic/elastic-otel-dotnet/blob/main/.github/workflows/release.yml#L63-L78 - name: Extract metadata (tags, labels)
id: docker-meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with:
images: ${{ env.DOCKER_IMAGE_NAME }}
flavor: |
latest=auto
tags: |
# "1.2.3" and "latest" Docker tags on push of git tag "v1.2.3"
type=semver,pattern={{version}},value=${{ steps.bootstrap.outputs.agent-version }}
# "edge" Docker tag on git push to default branch
type=edge - name: Extract metadata (tags, labels)
id: docker-meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with:
images: ${{ env.DOCKER_IMAGE_NAME }}
flavor: |
latest=auto
tags: |
# "1.2.3" and "latest" Docker tags on push of git tag "v1.2.3"
type=semver,pattern={{version}}
# "edge" Docker tag on git push to default branch
type=edge - name: Extract metadata (tags, labels)
id: docker-meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with:
images: ${{ env.DOCKER_IMAGE_NAME }}
tags: |
type=raw,value=latest,prefix=test-,enable={{is_default_branch}}
type=semver,pattern={{version}} |
In elastic/apm-agent-dotnet#2399 this change was made to fix an issue where (I think? I haven't read the full issue) the "latest" Docker image tag wasn't getting updated using diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index af776a75..a8ad00f3 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -60,7 +60,7 @@ jobs:
latest=auto
tags: |
# "1.2.3" and "latest" Docker tags on push of git tag "v1.2.3"
- type=raw,value=${{ steps.bootstrap.outputs.agent-version }}
+ type=semver,pattern={{version}},value=${{ steps.bootstrap.outputs.agent-version }}
# "edge" Docker tag on git push to default branch
type=edge |
From poking around at published images of About what docker tag is used for pushes of Docker images built for every push to main:
The |
Fantastic writeup and research into the effect of our image tagging @trentm thanks for that! Happy to understand we're all good :)
For reference we use minver command line tool to version all our .NET/Rust artifacts based on tags automatically. For untagged commits its next minor and the prerelease includes the distance to the previous tag for uniqueness. |
labels, and type (raw vs semver)
The text was updated successfully, but these errors were encountered: