Commit d7560d31 authored by Mark Chao's avatar Mark Chao
Browse files

Merge branch 'jivanvl-add-duration-finished-at-fields-job-type' into 'master'

Add more fields to the graphql job_type

See merge request gitlab-org/gitlab!54358
parents 3b016ca8 54972507
......@@ -18,6 +18,10 @@ class JobType < BaseObject
description: 'Schedule for the build.'
field :artifacts, Types::Ci::JobArtifactType.connection_type, null: true,
description: 'Artifacts generated by the job.'
field :finished_at, Types::TimeType, null: true,
description: 'When a job has finished running.'
field :duration, GraphQL::INT_TYPE, null: true,
description: 'Duration of the job in seconds.'
 
def pipeline
Gitlab::Graphql::Loaders::BatchModelLoader.new(::Ci::Pipeline, object.pipeline_id).find
......
---
title: Add duration and finishedAt GraphQL fields to jobType in the CI namespace
merge_request: 54358
author:
type: changed
This diff is collapsed.
This diff is collapsed.
......@@ -813,6 +813,8 @@ Autogenerated return type of CiCdSettingsUpdate.
| ----- | ---- | ----------- |
| `artifacts` | CiJobArtifactConnection | Artifacts generated by the job. |
| `detailedStatus` | DetailedStatus | Detailed status of the job. |
| `duration` | Int | Duration of the job in seconds. |
| `finishedAt` | Time | When a job has finished running. |
| `name` | String | Name of the job. |
| `needs` | CiBuildNeedConnection | References to builds that must complete before the jobs run. |
| `pipeline` | Pipeline | Pipeline the job belongs to. |
......
......@@ -14,6 +14,8 @@
detailedStatus
scheduledAt
artifacts
finished_at
duration
]
 
expect(described_class).to have_graphql_fields(*expected_fields)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment