tektoncd / pipeline

A cloud-native Pipeline resource.
https://tekton.dev
Apache License 2.0
8.49k stars 1.78k forks source link

Add docker image label `org.opencontainers.image.source` #7065

Open james-callahan opened 1 year ago

james-callahan commented 1 year ago

Feature request

Please add the standard OCI label org.opencontainers.image.source to the tekton docker images.

A full list of pre-defined annotations is available at: https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys

Use case

As an immediate use-case, I'd like to take advantage of renovate's changelog support (https://docs.renovatebot.com/modules/datasource/docker/)

But the label can also used for other purposes when e.g. mirroring the tekton docker images.

james-callahan commented 1 year ago

Looks like this repo uses ko rather than a Dockerfile or other docker build process; I couldn't find docs on how to add docker labels with ko, but eventually found it has a --image-label argument: https://github.com/ko-build/ko/blob/d4a1cc961c9064e9fd616ab39a9ace6cafacf2cd/pkg/commands/options/build.go#L85