concourse / registry-image-resource

a resource for images in a Docker registry
Apache License 2.0
89 stars 107 forks source link

Add `labels.json` with image labels #335

Closed austinjones closed 1 year ago

austinjones commented 1 year ago

This PR implements the suggestion from #295 to add the labels.json file. The file is written by the in command in map[string]string format, and is compatible with load_var.

Both rootfs and OCI formats are supported. However, the OCI format requires that the config file be parsed, which was not an existing error case. One alternative I considered was returning an empty map, rather than raising the error. Let me know what you think...

For a bit of background, I need this to extract a git revision label that was created by oci-build-task. This allows later pipelines to update git tags, using just the registry-image input.

austinjones commented 1 year ago

Awesome, thanks for the merge!

taylorsilva commented 1 year ago

A new version of the registry-image has been published so you can pull it from docker hub. It won't be part of concourse until the next release. Not sure when that'll be as I'm not part of the release team anymore.