Skip to content
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

chore: added oci label to Dockerfile to reference the source #179

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kvanzuijlen
Copy link

@kvanzuijlen kvanzuijlen commented Apr 17, 2024

This label could be used by (for example) Renovatebot to automatically pull a changelog into PRs it creates.

This label could be used by [Renovatebot](https://docs.renovatebot.com/modules/datasource/docker/) for example to automatically pull a changelog into PRs it creates.

Signed-off-by: kvanzuijlen <[email protected]>
@kvanzuijlen kvanzuijlen changed the title chore: added oci label to reference the source chore: added oci label to Dockerfile to reference the source Apr 17, 2024
Copy link
Contributor

@kaovilai kaovilai left a comment

Choose a reason for hiding this comment

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

can you also dynamically add this?

org.opencontainers.image.created

This is static

org.opencontainers.image.documentation="https://velero.io"

@kvanzuijlen
Copy link
Author

kvanzuijlen commented Apr 17, 2024

can you also dynamically add this?

org.opencontainers.image.created

This is static

org.opencontainers.image.documentation="https://velero.io"

Sure! I can also add other oci annotations if desired

This are all the oci annotations that could apply (I think):

  • org.opencontainers.image.created (current date)
  • org.opencontainers.image.authors (probably a static list?)
  • org.opencontainers.image.url (either gcr.io/velero-gcp/velero-plugin-for-gcp, hub.docker.com/r/velero/velero-plugin-for-gcp or velero.io)
  • org.opencontainers.image.documentation (https://velero.io)
  • org.opencontainers.image.version (same as version-tag for image (value currently set in docker-push.sh))
  • org.opencontainers.image.revision (git short sha (value currently set in Makefile))
  • org.opencontainers.image.vendor (vmware-tanzu)
  • org.opencontainers.image.licenses (Apache-2.0)
  • org.opencontainers.image.ref.name
  • org.opencontainers.image.title (velero-plugin-for-gcp)
  • org.opencontainers.image.description (Plugins to support Velero on Google Cloud Platform (GCP))
  • org.opencontainers.image.base.digest
  • org.opencontainers.image.base.name (scratch)

blackpiglet
blackpiglet previously approved these changes Apr 19, 2024
@kvanzuijlen
Copy link
Author

@kaovilai @blackpiglet shall I open a separate PR for additional labels? Which ones shall I add?

@blackpiglet
Copy link
Collaborator

If more labels are needed, I prefer to put them in the same PR.
I don't know what information is needed. @kaovilai Please share some insight.

@kaovilai
Copy link
Contributor

I don't think there's a need. Just nice to have. Same pr is fine.

@kvanzuijlen
Copy link
Author

kvanzuijlen commented Apr 19, 2024

I don't think there's a need. Just nice to have. Same pr is fine.

@kaovilai Which of the above listed labels? Only the ones you requested or some additional ones?

@kaovilai
Copy link
Contributor

I have no opinion on this other than that it should be labels that do not require manual update every release. If all we have now is all that's desired, we can stick with that for now, if there are others that are relatively low effort, I wouldn't mind it being added to this PR.

@kvanzuijlen
Copy link
Author

I ran the build locally, this is what the resulting labels look like with docker inspect:
image
created date/time is UTC.

Copy link
Contributor

@kaovilai kaovilai left a comment

Choose a reason for hiding this comment

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

lgtm. For consistency probably add to other repos if this merges.

Dockerfile Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.28%. Comparing base (07c222c) to head (d836cf2).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #179      +/-   ##
==========================================
- Coverage   29.73%   28.28%   -1.45%     
==========================================
  Files           3        4       +1     
  Lines         528      555      +27     
==========================================
  Hits          157      157              
- Misses        359      386      +27     
  Partials       12       12              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

4 participants