-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
[feat] Add labels to docker image linking to git hash #257
Comments
@LordMike I think you mean Docker labels right? Like this: But with some more infos like: https://github.com/hassio-addons/addon-zwave2mqtt/blob/master/zwave2mqtt/Dockerfile#L83-L100 |
Exactly. :) Damn. That's a large set of labels for the Hassio setup :O |
I think this could be enought: # Labels.
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.build-date=$BUILD_DATE
LABEL org.label-schema.name="zwave-js/zwavejs2mqtt"
LABEL org.label-schema.description="Zwave to Mqtt Gateway and control panel"
LABEL org.label-schema.url="https://zwave-js.github.io/zwavejs2mqtt/#/"
LABEL org.label-schema.vcs-url="https://github.com/zwave-js/zwavejs2mqtt"
LABEL org.label-schema.vcs-ref=$VCS_REF
LABEL org.label-schema.vendor="zwave-js"
LABEL org.label-schema.version=$BUILD_VERSION
LABEL org.label-schema.docker.cmd="docker run --rm -it -p 8091:8091 --device=/dev/ttyACM0 -v $(pwd)/store:/usr/src/app/store zwavejs/zwavejs2mqtt:latest" Build args:
|
Seems label-schema is deprecated in favour of https://github.com/opencontainers/image-spec/blob/master/annotations.md |
Oh I see - they did deprecate it .. They could've put a larger warning on the page :| The list of labels looks good. Vcs-ref is there, along with build-date. Would it be possible to get the git hash, of zwave-js? |
@LordMike See the new labels: https://github.com/zwave-js/zwavejs2mqtt/runs/1726326203#step:7:38 |
Neat. Looks cool - will definitely make it easier to know if I'm definitely running some hash. I'm guessing that getting the hash of zwavejs is tricky? It's my impression that the dev builds include latest/master builds of zwave-js, so in order to verify if a bugfix applies (and doesn't work), it'd be beneficial to know this hash as well.. Perhaps it could be shown in the UI / logs instead, if the labels pose an issue. In any case.. This is a great addition 👍 Edit: I also just noticed that docker builds are for pr's as well.. Woop woop :) |
It's shown on the UI :) |
I can't find it :O But neat. |
Oooh nope I had to add it but I forgot, the one shown is the z2m version. Could you add an issue as a reminder? |
Is your feature request related to a problem? Please describe.
When downloading a docker image, it could be useful to know exactly which commit this image was from. This goes for both
zwave-js
andzwavejs2mqtt
.Describe the solution you'd like
Add a label on builds, with the git hash of the two projects.
I'm fairly certain the change has to happen around here, but I'm not sure what to do.
Describe alternatives you've considered
N/A
Additional context
Pro-tip: Use well-defined labels, like these. I'd add
org.label-schema.vcs-ref
,org.label-schema.build-date
andorg.label-schema.schema-version
.The text was updated successfully, but these errors were encountered: