GraphQL: get GAR artifact details query
This issue is to add a new GraphQL query to get the artifact details from a Google Artifact Registry artifact.
Query Query.google_cloud_platform_registry_repository_artifact_details
will have the following required inputs:
- the project full path (or globalid).
- the artifact uri or name.
Upon a success, it will return an abstract type Integrations::GoogleCloudPlatform::ArtifactRegistry::ArtifactDetailsType
where the only concrete type will be Integrations::GoogleCloudPlatform::ArtifactRegistry::DockerImageDetailsType
with the following fields:
These from Integrations::GoogleCloudPlatform::ArtifactRegistry::DockerImageType
.
Name | Type |
---|---|
name |
String! |
uri |
String! |
tags |
[String] |
imageSizeBytes |
String |
uploadTime |
String |
mediaType |
String |
buildTime |
String |
updateTime |
String |
project |
String! |
location |
String! |
repository |
String! |
image |
String! |
digest |
String! |
gcpPageUrl |
String! |
The resolver should call on the client:
-
#repository
to make sure that it's the correct format (DOCKER
). -
#artifact
to get the artifact details.
Regarding permissions, the user will need to have read_gcp_artifact_registry_repository
on the target project.
These changes should be gated behind the Google Artifact Registry feature flag.
These changes should be marked as alpha.
Sample Response
Expected GraphQL Response
Click to expand
{
"data": {
"googleCloudPlatformRegistryRegistryArtifactDetails": {
"name": "projects/dev-package-container-96a3ff34/locations/us-east1/repositories/myrepo/dockerImages/alpine@sha256:6a0657acfef760bd9e293361c9b558e98e7d740ed0dffca823d17098a4ffddf5",
"uri": "us-east1-docker.pkg.dev/dev-package-container-96a3ff34/myrepo/alpine@sha256:6a0657acfef760bd9e293361c9b558e98e7d740ed0dffca823d17098a4ffddf5",
"tags": [
"3.15",
"3.15.11"
],
"imageSizeBytes": 2827903,
"uploadTime": "2023-12-07T11:48:47.598511Z",
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"buildTime": "2023-11-30T23:23:11.980068941Z",
"updateTime": "2023-12-07T11:48:50.840751Z",
"project": "dev-package-container-96a3ff34",
"location": "us-east1",
"repository": "myrepo",
"image": "alpine",
"digest": "sha256:6a0657acfef760bd9e293361c9b558e98e7d740ed0dffca823d17098a4ffddf5",
"gcpPageUrl": "https://us-east1-docker.pkg.dev/dev-package-container-96a3ff34/myrepo/alpine@sha256:6a0657acfef760bd9e293361c9b558e98e7d740ed0dffca823d17098a4ffddf5"
}
}
}
Plan
- New Google Artifact Registry Project Integration (#425066 - closed)
- GAR Integration: Custom client class (#425147 - closed)
- GraphQL: get GAR artifacts from project (#425149 - closed)
- GraphQL: get GAR artifact details query. (
👈 this issue) - 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)