Skip to content

Adds digest label & copy button for dependency proxy UI

What does this MR do and why?

This MR adds digest label & copy button for dependency proxy UI.

  • Shows digest for each manifest.
  • if image name does not contain sha256 digest, show name with tag, otherwise just shows the name.
  • Adds clipboard button for each manifest.

Why

When we render the image tag, we assume that the value of imageName is in the format <name>:<tag>.

We missed the use-case where the imageName is in the format <name>:sha256:<digest>

Screenshots or screen recordings

before after
Screenshot_2023-05-02_at_12.43.30_am Screenshot_2023-05-02_at_12.28.39_am

How to set up and validate locally

  1. Enable dependency proxy on GDK.
  2. Visit Group > Packages and registries > Dependency proxy
  3. Assuming 172.16.123.1:3000/gitlab-org/dependency_proxy/containers is the Dependency proxy image prefix on the page, run the following on the terminal:
    • docker pull 172.16.123.1:3000/gitlab-org/dependency_proxy/containers/hello-world@sha256:995efde2e81b21d1ea7066aa77a59298a62a9e9fbb4b77f36c189774ec9b1089
    • docker pull 172.16.123.1:3000/gitlab-org/dependency_proxy/containers/hello-world
  4. Reload the page
  5. Confirm that the two images are listed, digest is always visible & copy button tooltip is working with the right text being copied.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Closes #396383 (closed)

Edited by Rahul Chanila

Merge request reports