New Google Artifact Registry Project Integration
Context
Related to Google Artifact Registry Integration for Contai... (&11443 - closed). See this epic description for more context.
Plan
TODO: Replace content with link to !131643 (merged) once merged.
As discussed in the approach, we will need to implement a new project integration. We suggest using the class Integrations::GoogleCloudPlatform::ArtifactRegistry
. The Integrations::GoogleCloudPlatform
namespace allows us to have possible future other integrations for the other services of the Google Cloud Platform.
We will need to have the following properties:
-
google_project_id
- the google project id. A simple string. -
google_location
- the google location. A simple string.- We might be able to validate this against an existing list of locations.
-
repositories
- an array of repository names (see below). -
identity_provider_audience_uri
- the identity provider audience uri. A string.
Why do we need repositories
? The challenge here is that one of the probable follow ups is supporting the other repository formats. Once all formats are supported, we could have situations where users will want to display multiple respositories within a single GitLab project. We will thus need to support multiple repositories. To prepare for that, it's better to already take this into account and configure the integration object as having multiple repositories.
Having said that, the very first version of this integration will only support 1
repository. The idea here is thus, have a repositories
key in the integration properties and then have the right getter/setter functions on the first repository of that array (methods #repository
and #repository=
). This way, we can leverage the existing frontend form helpers on that "computed" field.
Regarding the configuration test feature, we need to get the repository info on the official api. The test is successful if and only if, the call is successful and the returned repository has the format DOCKER
.
We're starting at the project level only so this integration should be available only for projects.
This being the first implementation issue, introduce and use a feature flag.
Plan
- New project integration (
👈 this issue) - GAR Integration: Custom client class (#425147 - closed)
- GraphQL: get GAR artifacts from project (#425149 - closed)
- GraphQL: get GAR artifact details query (#425150 - closed)
- GAR Integration: Add predefined CI variables (#425153 - closed)
- GAR integration: frontend menu entry and list o... (#425154 - closed)
- GAR integration: frontend artifact details page (#425157 - closed)
- GAR integration documentation (#425158 - closed)