Skip to content
代码片段 群组 项目
提交 d7560d31 编辑于 作者: Mark Chao's avatar Mark Chao
浏览文件

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
No related branches found
No related tags found
无相关合并请求
...@@ -18,6 +18,10 @@ class JobType < BaseObject ...@@ -18,6 +18,10 @@ class JobType < BaseObject
description: 'Schedule for the build.' description: 'Schedule for the build.'
field :artifacts, Types::Ci::JobArtifactType.connection_type, null: true, field :artifacts, Types::Ci::JobArtifactType.connection_type, null: true,
description: 'Artifacts generated by the job.' 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 def pipeline
Gitlab::Graphql::Loaders::BatchModelLoader.new(::Ci::Pipeline, object.pipeline_id).find 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
此差异已折叠。
此差异已折叠。
...@@ -813,6 +813,8 @@ Autogenerated return type of CiCdSettingsUpdate. ...@@ -813,6 +813,8 @@ Autogenerated return type of CiCdSettingsUpdate.
| ----- | ---- | ----------- | | ----- | ---- | ----------- |
| `artifacts` | CiJobArtifactConnection | Artifacts generated by the job. | | `artifacts` | CiJobArtifactConnection | Artifacts generated by the job. |
| `detailedStatus` | DetailedStatus | Detailed status of 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. | | `name` | String | Name of the job. |
| `needs` | CiBuildNeedConnection | References to builds that must complete before the jobs run. | | `needs` | CiBuildNeedConnection | References to builds that must complete before the jobs run. |
| `pipeline` | Pipeline | Pipeline the job belongs to. | | `pipeline` | Pipeline | Pipeline the job belongs to. |
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
detailedStatus detailedStatus
scheduledAt scheduledAt
artifacts artifacts
finished_at
duration
] ]
expect(described_class).to have_graphql_fields(*expected_fields) expect(described_class).to have_graphql_fields(*expected_fields)
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册