Skip to content

Conversation

@v1v
Copy link
Member

@v1v v1v commented Apr 29, 2024

What does this pull request do?

Use https://github.com/docker/metadata-action/tree/8e5442c4ef9f78752691e2d8f8d19755c6f78e81/?tab=readme-ov-file#typeref to get the tags/annotations/labels

Use sha commit for the github action related to docker.

Test

See https://github.com/elastic/apm-agent-python/actions/runs/8879068667

tags: docker.elastic.co/observability/apm-agent-python:test-latest
    labels: org.opencontainers.image.created=2024-04-29T13:04:44.8[6](https://github.com/elastic/apm-agent-python/actions/runs/8879068667/job/24375994029#step:6:6)6Z
  org.opencontainers.image.description=Official Python agent for Elastic APM
  org.opencontainers.image.licenses=BSD-3-Clause
  org.opencontainers.image.revision=[7](https://github.com/elastic/apm-agent-python/actions/runs/8879068667/job/24375994029#step:6:7)ea253bd5942e0e0782449edba9ee78f01a8c64a
  org.opencontainers.image.source=https://github.com/elastic/apm-agent-python
  org.opencontainers.image.title=apm-agent-python
  org.opencontainers.image.url=https://github.com/elastic/apm-agent-python
  org.opencontainers.image.version=test-latest
    build-args: AGENT_DIR=./build/dist/package/python

Related issues

elastic/apm-agent-nodejs#3998

@v1v v1v requested review from a team April 29, 2024 13:04
@v1v v1v self-assigned this Apr 29, 2024
Copy link
Member

@xrmx xrmx left a comment

Choose a reason for hiding this comment

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

Are we publishing to docker at each merge to main?

@v1v
Copy link
Member Author

v1v commented Apr 29, 2024

Are we publishing to docker at each merge to main?

That's correct, it was added in #1998

The tag is test-latest in that particular case

xrmx
xrmx previously approved these changes Apr 29, 2024
@v1v v1v enabled auto-merge (squash) April 29, 2024 13:20
@v1v v1v disabled auto-merge April 29, 2024 13:22
${{ env.DOCKER_IMAGE_NAME }}:${{ steps.setup-docker.outputs.tag }}
${{ env.DOCKER_IMAGE_NAME }}:${{ steps.setup-docker.outputs.latest }}
tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.docker-meta.outputs.labels }}
Copy link
Member Author

Choose a reason for hiding this comment

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

This will add some labels to the docker image using the open-containers standard

Copy link
Member Author

Choose a reason for hiding this comment

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

We discussed a bit further about this in elastic/apm-agent-nodejs#3998 (comment)

images: ${{ env.DOCKER_IMAGE_NAME }}
tags: |
type=raw,value=latest,prefix=test-,enable={{is_default_branch}}
type=semver,pattern={{version}}
Copy link
Member Author

@v1v v1v Apr 30, 2024

Choose a reason for hiding this comment

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

@v1v v1v merged commit 880c594 into elastic:main May 7, 2024
@v1v v1v deleted the provenance-docker branch May 7, 2024 14:00
xrmx pushed a commit to xrmx/apm-agent-python that referenced this pull request May 17, 2024
xrmx pushed a commit to xrmx/apm-agent-python that referenced this pull request May 20, 2024
xrmx pushed a commit to xrmx/apm-agent-python that referenced this pull request Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants