Skip to content

Add GoogleCloudPlatform::ArtifactRegistry integration

What does this MR do and why?

This MR introduces the new project integration (development guidelines) GoogleCloudPlatform::ArtifactRegistry

What is out of scope of this MR is the configuration test https://docs.gitlab.com/ee/development/integrations/#define-configuration-test

It'll be added later when we finish the refactoring of the client class GAR Integration: Custom client class (#425147 - closed)

I open the new issue to implement the configuration test GAR integrations: Implement configuration test ... (#438560 - closed)

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

The integration form The integration is in the list of integrations
Screenshot_2024-01-19_at_15.42.58 Screenshot_2024-01-18_at_13.17.10

How to set up and validate locally

  1. Simulate a SaaS instance in the local GDK

  2. Enable the feature flag in the rails console:

    Feature.enable(:gcp_artifact_registry)

Using UI

  1. Visit Project > Settings > Integrations

  2. Choose to configure Google Cloud Platform Artifact Registry integration

  3. Fill the form with required field and enable the integration.

  4. The new integration should appear in the list of active integrations.

Using REST API

  1. Create the new Google Artifact Registry integration

    curl --request PUT --header "Authorization: Bearer <gl-pat>" "http://gdk.test:3000/api/v4/projects/<project-id>/integrations/google-cloud-platform-artifact-registry" -H "Content-Type: application/json" -d '{"artifact_registry_project_id": "dmeshcharakou-920d238d", "artifact_registry_location": "europe-west6", "artifact_registry_repositories": "myrepo", "workload_identity_pool_project_number": "917659427920", "workload_identity_pool_id": "gitlab-gcp-demo", "workload_identity_pool_provider_id": "gitlab-gcp-prod-gitlab-org"}'
  2. Retrieve the integration

    curl --header "Authorization: Bearer <gl-pat>" "http://gdk.test:3000/api/v4/projects/<project-id>/integrations/google-cloud-platform-artifact-registry"
  3. Delete the integration

    curl --request DELETE --header "Authorization: Bearer <gl-pat>" "http://gdk.test:3000/api/v4/projects/<project-id>/integrations/google-cloud-platform-artifact-registry"

Related to #425066 (closed)

Edited by David Fernandez

Merge request reports