Add GraphQL endpoint to fetch image manifests from container registry
What does this MR do and why?
Adds a GraphQL endpoint for fetching an image manifest from the container registry. This information will be used to display signature data alongside an associated container image.
Sample query
query {
containerRepository(id:"gid://gitlab/ContainerRepository/2") {
manifest(reference:"sha256:f3d00388a5c1441a1e5c1da89702e8269ae0fbb6235f5721951e25304e9f845d")
}
}
How to set up and validate locally
Local reproduction requires a running container registry, either from source or via the support/docker-registry
script in GDK. With registry enabled:
- Create a new project, build and push a new image - instructions here: https://docs.gitlab.com/ee/user/packages/container_registry/build_and_push_images.html
- From the project page in Gitlab, navigate
Deploy
>Container Registry
in left menu. - Select the new repository. Note the ID number in the URL.
- Open a GraphiQL explorer at http://localhost:3000/-/graphql-explorer and run the query above, replacing the repository number, and using either the tag name or digest of the image as the
reference
argument. The digests can be viewed by runningdocker image ls --digests
.
Related to #442845 (closed)
Edited by Aaron Huntsman