Skip to content

Adds link to project in container registry group view

What does this MR do and why?

This is what the issue wanted me to do: Add a link to the project in the container regi... (#358098 - closed)

This is what I did instead:

There's an opportunity here to keep it consistent amongst the different registries, so I'm proposing that here.

Adds published message for each container registry image repository on the list page which is similar to the package registry list page.

Introduced a shared component called PublishMessage to display publish message.

The PublishMessage component displays information such as the publish date, project name, project URL, and author (if available). Additionally, the component can be used on group pages and displays the package name and link to the project page.

This component can be reused in multiple places,

  • the container registry image list page
  • package registry list page
  • the versions tab in the package details page.

Changelog: added

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Container Registry list page

Page Before After
Group page Screenshot_2024-05-25_at_12.26.00_AM Screenshot_2024-05-25_at_12.11.59_AM
Project page Screenshot_2024-05-25_at_12.25.53_AM Screenshot_2024-05-25_at_12.12.11_AM

Package registry list page

No change in UI

Package registry details page versions tab

Before After
Screenshot_2024-05-25_at_12.26.14_AM Screenshot_2024-05-25_at_12.12.32_AM

How to set up and validate locally

Package Registry

List & Details

  1. rails c - Open the rails console

  2. p = Project.find(1) - Find one of your GDK projects. Project id can be found on the project home page

  3. FactoryBot.create_list(:npm_package, 10, project: p, name: p.name) - Creates 10 npm packages

  4. Add this line if above fails during the creation

     def fixture_file_upload(*args, **kwargs)
       Rack::Test::UploadedFile.new(*args, **kwargs)
     end
  5. Visit groups & projects package list page.

  6. visit package registry detail page Other versions tab via groups & projects package list page

Container Registry

Images list

  1. Setup & enable Container Registry https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/registry.md

  2. Follow steps in https://gitlab.com/gitlab-org/ci-cd/package-stage/package/-/wikis/Packages-Tips-&-Tricks#how-to-add-images-with-tags-quickly-to-the-registry

  3. To see pagination, run the following in the terminal

    $ ./publish.sh <project-path> 2 10 127.0.0.1:5000 # creates 10 images with 2 tags each
  4. Visit the container registry list page for the project

Related to #358098 (closed)

Edited by Rahul Chanila

Merge request reports