Skip to content

Conversation

jmtd
Copy link
Member

@jmtd jmtd commented Apr 8, 2024

Amongst other things, this allows GitHub to provide links back from Container Images to the source repository that built them (if we publish Container Images to GHCR.) See
https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys

https://issues.redhat.com/browse/OPENJDK-4003

Amongst other things, this allows GitHub to provide links back from
Container Images to the source repository that built them (if we publish
Container Images to GHCR.) See
<https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys>

Signed-off-by: Jonathan Dowland <[email protected]>
@jmtd jmtd force-pushed the opencontainers-source branch from d89a10e to ad2f2d6 Compare July 23, 2025 14:14
@jmtd jmtd requested a review from jerboaa July 23, 2025 14:14
@jmtd jmtd marked this pull request as ready for review July 23, 2025 14:14
@jmtd jmtd added the ubi9 RHEL UBI 9 label Jul 23, 2025
Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

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

Shouldn't these be links to this instead?

https://github.com/rh-openjdk/redhat-openjdk-containers/tree/ubi9

@jmtd
Copy link
Member Author

jmtd commented Aug 5, 2025

That's a good idea (identifying the branch). That form of URI is suitable for humans but not automation (I don't think you could git clone it). The specification is ambiguous) as to whether it should be cloneable or not; it refers back to the older label schema spec which is also not 100% clear, it says "URL for the source code under version control from which this container image was built.". The key in the old spec was labelled vcs-uri, that's borrowed from Debian packaging, in which the intent is for it to be cloneable. (I think it was me that suggested those labels in the older spec, but I might be remembering wrong).

There's a separate org.opencontainers.image.revision label, "Source control revision identifier for the packaged software". If we put ubi9 in that, and left the current label as-is, the original label would be cloneable but it would be unambigious what ref to use. WDYT?

@jerboaa
Copy link
Contributor

jerboaa commented Aug 5, 2025

There's a separate org.opencontainers.image.revision label, "Source control revision identifier for the packaged software". If we put ubi9 in that, and left the current label as-is, the original label would be cloneable but it would be unambigious what ref to use. WDYT?

That should work, yes.

@jerboaa
Copy link
Contributor

jerboaa commented Aug 5, 2025

Ideally we'd have a tag for each version and refer to it in org.opencontainers.image.version. E.g. ubi9-1.24 and use that as a tag once released.

@jmtd
Copy link
Member Author

jmtd commented Aug 5, 2025

I tag releases as e.g. ubi9-openjdk-containers-1.XX, but it's a manual process and I don 't do it until we've shipped the corresponding release. But we could use that, yeah

@jmtd
Copy link
Member Author

jmtd commented Aug 5, 2025

I've not added version (yet) because of a chicken-and-egg problem: it would refer to a tag that doesn't (and can't) exist until the value has been written into the YAML, since that commit would be what the tag would reference.

@jmtd jmtd merged commit 9151fdf into rh-openjdk:ubi9 Aug 5, 2025
2 of 4 checks passed
@jmtd jmtd deleted the opencontainers-source branch August 5, 2025 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ubi9 RHEL UBI 9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants