Skip to content

Get Google Cloud artifacts from project

What does this MR do and why?

Add a new field google_cloud_artifact_registry_repository_artifacts to the GraphQL Project type in order to fetch the Google Cloud repository artifacts.

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

Successful GraphQL request

Screenshot_2024-02-09_at_16.18.04

How to set up and validate locally

  1. Required setup for Google Cloud is described here

  2. Prepare the project with the Google Cloud Artifact Registry integration. The details on how to create a new integration are described here

  3. Visit http://gdk.test:3000/-/graphql-explorer and create the request.

    query getGarArtifactsFromProject {
      project(fullPath: "gitlab-org/gitlab-test") {
        googleCloudArtifactRegistryRepository {
          projectId,
          repository,
          artifactRegistryRepositoryUrl,
          artifacts {
            nodes {
              ... on GoogleCloudArtifactRegistryDockerImage {
                name
                uri
                tags
                imageSizeBytes
                uploadTime
                mediaType
                buildTime
                updateTime
                projectId
                location
                repository
                image
                digest
                artifactRegistryImageUrl
              }
            },
            pageInfo {
              hasNextPage,
              startCursor,
              endCursor
            }
          }
        }
      }
    }

    The artifacts field supports the following arguments first, sort, after.

Related to #425149 (closed)

Edited by Dzmitry Meshcharakou

Merge request reports