Skip to content
Snippets Groups Projects
Commit b9f3a984 authored by David Fernandez's avatar David Fernandez :two:
Browse files

Merge branch 'gar-add-uri-to-docker-image-type' into 'master'

parents 19d1ee9a 12806fda
No related branches found
No related tags found
1 merge request!146396Move uri field to the base DockerImage type
Pipeline #1199773759 passed
......@@ -19971,6 +19971,7 @@ Represents a docker artifact of Google Artifact Registry.
| <a id="googlecloudartifactregistrydockerimagetags"></a>`tags` | [`[String!]`](#string) | Tags attached to the image. |
| <a id="googlecloudartifactregistrydockerimageupdatetime"></a>`updateTime` | [`Time`](#time) | Time when the image was last updated. |
| <a id="googlecloudartifactregistrydockerimageuploadtime"></a>`uploadTime` | [`Time`](#time) | Time when the image was uploaded. |
| <a id="googlecloudartifactregistrydockerimageuri"></a>`uri` | [`String!`](#string) | Google Cloud URI to access the image. |
 
### `GoogleCloudArtifactRegistryDockerImageDetails`
 
......@@ -8,11 +8,6 @@ class DockerImageDetailsType < DockerImageType
graphql_name 'GoogleCloudArtifactRegistryDockerImageDetails'
description 'Represents details about docker artifact of Google Artifact Registry'
field :uri,
GraphQL::Types::String,
null: false,
description: 'Google Cloud URI to access the image.'
field :image_size_bytes,
GraphQL::Types::String,
description: 'Calculated size of the image.'
......
......@@ -51,6 +51,11 @@ class DockerImageType < BaseObject
null: false,
description: "Image's digest."
field :uri,
GraphQL::Types::String,
null: false,
description: 'Google Cloud URI to access the image.'
def upload_time
return unless artifact.upload_time
......
......@@ -10,7 +10,7 @@
it 'includes all expected fields' do
expected_fields = %w[
name uri tags image_size_bytes upload_time
name tags image_size_bytes upload_time
media_type build_time update_time project_id
location repository image digest artifact_registry_image_url
]
......
......@@ -8,7 +8,7 @@
end
it 'includes all expected fields' do
expected_fields = %w[name tags upload_time update_time image digest]
expected_fields = %w[name tags upload_time update_time image digest uri]
expect(described_class).to include_graphql_fields(*expected_fields)
end
......
......@@ -113,6 +113,7 @@
'nodes' => [{
'name' => docker_image.name,
'tags' => docker_image.tags,
'uri' => docker_image.uri,
'uploadTime' => Time.now.iso8601,
'updateTime' => Time.now.iso8601,
'image' => image,
......
......@@ -6,7 +6,8 @@
"uploadTime",
"updateTime",
"image",
"digest"
"digest",
"uri"
],
"properties": {
"name": {
......
......@@ -6,7 +6,6 @@
}
],
"required": [
"uri",
"imageSizeBytes",
"buildTime",
"mediaType",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment