Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/ci')
-rw-r--r--app/graphql/types/ci/analytics_type.rb22
-rw-r--r--app/graphql/types/ci/application_setting_type.rb2
-rw-r--r--app/graphql/types/ci/build_need_type.rb4
-rw-r--r--app/graphql/types/ci/ci_cd_setting_type.rb22
-rw-r--r--app/graphql/types/ci/config/config_type.rb12
-rw-r--r--app/graphql/types/ci/config/group_type.rb6
-rw-r--r--app/graphql/types/ci/config/job_restriction_type.rb2
-rw-r--r--app/graphql/types/ci/config/job_type.rb38
-rw-r--r--app/graphql/types/ci/config/need_type.rb2
-rw-r--r--app/graphql/types/ci/config/stage_type.rb4
-rw-r--r--app/graphql/types/ci/detailed_status_type.rb30
-rw-r--r--app/graphql/types/ci/group_type.rb10
-rw-r--r--app/graphql/types/ci/group_variable_type.rb25
-rw-r--r--app/graphql/types/ci/instance_variable_type.rb33
-rw-r--r--app/graphql/types/ci/job_artifact_type.rb8
-rw-r--r--app/graphql/types/ci/job_token_scope_type.rb8
-rw-r--r--app/graphql/types/ci/job_type.rb72
-rw-r--r--app/graphql/types/ci/manual_variable_type.rb25
-rw-r--r--app/graphql/types/ci/pipeline_message_type.rb4
-rw-r--r--app/graphql/types/ci/pipeline_type.rb72
-rw-r--r--app/graphql/types/ci/project_variable_type.rb25
-rw-r--r--app/graphql/types/ci/recent_failures_type.rb4
-rw-r--r--app/graphql/types/ci/runner_architecture_type.rb8
-rw-r--r--app/graphql/types/ci/runner_platform_type.rb10
-rw-r--r--app/graphql/types/ci/runner_setup_type.rb4
-rw-r--r--app/graphql/types/ci/runner_type.rb76
-rw-r--r--app/graphql/types/ci/runner_upgrade_status_enum.rb (renamed from app/graphql/types/ci/runner_upgrade_status_type_enum.rb)4
-rw-r--r--app/graphql/types/ci/runner_web_url_edge.rb8
-rw-r--r--app/graphql/types/ci/stage_type.rb12
-rw-r--r--app/graphql/types/ci/status_action_type.rb16
-rw-r--r--app/graphql/types/ci/template_type.rb4
-rw-r--r--app/graphql/types/ci/test_case_type.rb26
-rw-r--r--app/graphql/types/ci/test_report_summary_type.rb8
-rw-r--r--app/graphql/types/ci/test_report_total_type.rb14
-rw-r--r--app/graphql/types/ci/test_suite_summary_type.rb30
-rw-r--r--app/graphql/types/ci/test_suite_type.rb29
-rw-r--r--app/graphql/types/ci/variable_input_type.rb13
-rw-r--r--app/graphql/types/ci/variable_interface.rb31
-rw-r--r--app/graphql/types/ci/variable_type.rb40
39 files changed, 455 insertions, 308 deletions
diff --git a/app/graphql/types/ci/analytics_type.rb b/app/graphql/types/ci/analytics_type.rb
index a77b8026f86..6a55a6138ea 100644
--- a/app/graphql/types/ci/analytics_type.rb
+++ b/app/graphql/types/ci/analytics_type.rb
@@ -7,27 +7,27 @@ module Types
graphql_name 'PipelineAnalytics'
field :month_pipelines_labels, [GraphQL::Types::String], null: true,
- description: 'Labels for the monthly pipeline count.'
+ description: 'Labels for the monthly pipeline count.'
field :month_pipelines_successful, [GraphQL::Types::Int], null: true,
- description: 'Total monthly successful pipeline count.'
+ description: 'Total monthly successful pipeline count.'
field :month_pipelines_totals, [GraphQL::Types::Int], null: true,
- description: 'Total monthly pipeline count.'
+ description: 'Total monthly pipeline count.'
field :pipeline_times_labels, [GraphQL::Types::String], null: true,
- description: 'Pipeline times labels.'
+ description: 'Pipeline times labels.'
field :pipeline_times_values, [GraphQL::Types::Int], null: true,
- description: 'Pipeline times.'
+ description: 'Pipeline times.'
field :week_pipelines_labels, [GraphQL::Types::String], null: true,
- description: 'Labels for the weekly pipeline count.'
+ description: 'Labels for the weekly pipeline count.'
field :week_pipelines_successful, [GraphQL::Types::Int], null: true,
- description: 'Total weekly successful pipeline count.'
+ description: 'Total weekly successful pipeline count.'
field :week_pipelines_totals, [GraphQL::Types::Int], null: true,
- description: 'Total weekly pipeline count.'
+ description: 'Total weekly pipeline count.'
field :year_pipelines_labels, [GraphQL::Types::String], null: true,
- description: 'Labels for the yearly pipeline count.'
+ description: 'Labels for the yearly pipeline count.'
field :year_pipelines_successful, [GraphQL::Types::Int], null: true,
- description: 'Total yearly successful pipeline count.'
+ description: 'Total yearly successful pipeline count.'
field :year_pipelines_totals, [GraphQL::Types::Int], null: true,
- description: 'Total yearly pipeline count.'
+ description: 'Total yearly pipeline count.'
end
end
end
diff --git a/app/graphql/types/ci/application_setting_type.rb b/app/graphql/types/ci/application_setting_type.rb
index 2322778d159..53202c56f03 100644
--- a/app/graphql/types/ci/application_setting_type.rb
+++ b/app/graphql/types/ci/application_setting_type.rb
@@ -8,7 +8,7 @@ module Types
authorize :read_application_setting
field :keep_latest_artifact, GraphQL::Types::Boolean, null: true,
- description: 'Whether to keep the latest jobs artifacts.'
+ description: 'Whether to keep the latest jobs artifacts.'
end
end
end
diff --git a/app/graphql/types/ci/build_need_type.rb b/app/graphql/types/ci/build_need_type.rb
index b71d10c4c06..4ab711881fe 100644
--- a/app/graphql/types/ci/build_need_type.rb
+++ b/app/graphql/types/ci/build_need_type.rb
@@ -8,9 +8,9 @@ module Types
graphql_name 'CiBuildNeed'
field :id, GraphQL::Types::ID, null: false,
- description: 'ID of the BuildNeed.'
+ description: 'ID of the BuildNeed.'
field :name, GraphQL::Types::String, null: true,
- description: 'Name of the job we need to complete.'
+ description: 'Name of the job we need to complete.'
end
end
end
diff --git a/app/graphql/types/ci/ci_cd_setting_type.rb b/app/graphql/types/ci/ci_cd_setting_type.rb
index e43af6f3e78..bec8c72e783 100644
--- a/app/graphql/types/ci/ci_cd_setting_type.rb
+++ b/app/graphql/types/ci/ci_cd_setting_type.rb
@@ -7,20 +7,22 @@ module Types
authorize :admin_project
- field :job_token_scope_enabled, GraphQL::Types::Boolean, null: true,
- description: 'Indicates CI job tokens generated in this project have restricted access to resources.',
- method: :job_token_scope_enabled?
+ field :job_token_scope_enabled,
+ GraphQL::Types::Boolean,
+ null: true,
+ description: 'Indicates CI job tokens generated in this project have restricted access to resources.',
+ method: :job_token_scope_enabled?
field :keep_latest_artifact, GraphQL::Types::Boolean, null: true,
- description: 'Whether to keep the latest builds artifacts.',
- method: :keep_latest_artifacts_available?
+ description: 'Whether to keep the latest builds artifacts.',
+ method: :keep_latest_artifacts_available?
field :merge_pipelines_enabled, GraphQL::Types::Boolean, null: true,
- description: 'Whether merge pipelines are enabled.',
- method: :merge_pipelines_enabled?
+ description: 'Whether merge pipelines are enabled.',
+ method: :merge_pipelines_enabled?
field :merge_trains_enabled, GraphQL::Types::Boolean, null: true,
- description: 'Whether merge trains are enabled.',
- method: :merge_trains_enabled?
+ description: 'Whether merge trains are enabled.',
+ method: :merge_trains_enabled?
field :project, Types::ProjectType, null: true,
- description: 'Project the CI/CD settings belong to.'
+ description: 'Project the CI/CD settings belong to.'
end
end
end
diff --git a/app/graphql/types/ci/config/config_type.rb b/app/graphql/types/ci/config/config_type.rb
index a7a6927136d..6ccc62331df 100644
--- a/app/graphql/types/ci/config/config_type.rb
+++ b/app/graphql/types/ci/config/config_type.rb
@@ -8,17 +8,17 @@ module Types
graphql_name 'CiConfig'
field :errors, [GraphQL::Types::String], null: true,
- description: 'Linting errors.'
+ description: 'Linting errors.'
field :includes, [Types::Ci::Config::IncludeType], null: true,
- description: 'List of included files.'
+ description: 'List of included files.'
field :merged_yaml, GraphQL::Types::String, null: true,
- description: 'Merged CI configuration YAML.'
+ description: 'Merged CI configuration YAML.'
field :stages, Types::Ci::Config::StageType.connection_type, null: true,
- description: 'Stages of the pipeline.'
+ description: 'Stages of the pipeline.'
field :status, Types::Ci::Config::StatusEnum, null: true,
- description: 'Status of linting, can be either valid or invalid.'
+ description: 'Status of linting, can be either valid or invalid.'
field :warnings, [GraphQL::Types::String], null: true,
- description: 'Linting warnings.'
+ description: 'Linting warnings.'
end
end
end
diff --git a/app/graphql/types/ci/config/group_type.rb b/app/graphql/types/ci/config/group_type.rb
index 19076fe9c20..8c4a0c04a2a 100644
--- a/app/graphql/types/ci/config/group_type.rb
+++ b/app/graphql/types/ci/config/group_type.rb
@@ -8,11 +8,11 @@ module Types
graphql_name 'CiConfigGroup'
field :jobs, Types::Ci::Config::JobType.connection_type, null: true,
- description: 'Jobs in group.'
+ description: 'Jobs in group.'
field :name, GraphQL::Types::String, null: true,
- description: 'Name of the job group.'
+ description: 'Name of the job group.'
field :size, GraphQL::Types::Int, null: true,
- description: 'Size of the job group.'
+ description: 'Size of the job group.'
end
end
end
diff --git a/app/graphql/types/ci/config/job_restriction_type.rb b/app/graphql/types/ci/config/job_restriction_type.rb
index 8cf0e210def..bb9c03f7c1e 100644
--- a/app/graphql/types/ci/config/job_restriction_type.rb
+++ b/app/graphql/types/ci/config/job_restriction_type.rb
@@ -8,7 +8,7 @@ module Types
graphql_name 'CiConfigJobRestriction'
field :refs, [GraphQL::Types::String], null: true,
- description: 'Git refs the job restriction applies to.'
+ description: 'Git refs the job restriction applies to.'
end
end
end
diff --git a/app/graphql/types/ci/config/job_type.rb b/app/graphql/types/ci/config/job_type.rb
index 20279143635..fb92a37dee6 100644
--- a/app/graphql/types/ci/config/job_type.rb
+++ b/app/graphql/types/ci/config/job_type.rb
@@ -7,33 +7,41 @@ module Types
class JobType < BaseObject
graphql_name 'CiConfigJob'
- field :after_script, [GraphQL::Types::String], null: true,
+ field :after_script,
+ [GraphQL::Types::String],
+ null: true,
description: 'Override a set of commands that are executed after the job.'
field :allow_failure, GraphQL::Types::Boolean, null: true,
- description: 'Allow job to fail.'
- field :before_script, [GraphQL::Types::String], null: true,
+ description: 'Allow job to fail.'
+ field :before_script,
+ [GraphQL::Types::String],
+ null: true,
description: 'Override a set of commands that are executed before the job.'
field :environment, GraphQL::Types::String, null: true,
- description: 'Name of an environment to which the job deploys.'
+ description: 'Name of an environment to which the job deploys.'
field :except, Types::Ci::Config::JobRestrictionType, null: true,
- description: 'Limit when jobs are not created.'
+ description: 'Limit when jobs are not created.'
field :group_name, GraphQL::Types::String, null: true,
- description: 'Name of the job group.'
+ description: 'Name of the job group.'
field :name, GraphQL::Types::String, null: true,
- description: 'Name of the job.'
- field :needs, Types::Ci::Config::NeedType.connection_type, null: true,
+ description: 'Name of the job.'
+ field :needs,
+ Types::Ci::Config::NeedType.connection_type,
+ null: true,
description: 'Builds that must complete before the jobs run.'
- field :only, Types::Ci::Config::JobRestrictionType, null: true,
- description: 'Jobs are created when these conditions do not apply.'
+ field :only,
+ Types::Ci::Config::JobRestrictionType,
+ null: true,
+ description: 'Jobs are created when these conditions do not apply.'
field :script, [GraphQL::Types::String], null: true,
- description: 'Shell script that is executed by a runner.'
+ description: 'Shell script that is executed by a runner.'
field :stage, GraphQL::Types::String, null: true,
- description: 'Name of the job stage.'
+ description: 'Name of the job stage.'
field :tags, [GraphQL::Types::String], null: true,
- description: 'List of tags that are used to select a runner.'
+ description: 'List of tags that are used to select a runner.'
field :when, GraphQL::Types::String, null: true,
- description: 'When to run the job.',
- resolver_method: :restrict_when_to_run_jobs
+ description: 'When to run the job.',
+ resolver_method: :restrict_when_to_run_jobs
def restrict_when_to_run_jobs
object[:when]
diff --git a/app/graphql/types/ci/config/need_type.rb b/app/graphql/types/ci/config/need_type.rb
index 6e9aea8eb64..dd262923246 100644
--- a/app/graphql/types/ci/config/need_type.rb
+++ b/app/graphql/types/ci/config/need_type.rb
@@ -8,7 +8,7 @@ module Types
graphql_name 'CiConfigNeed'
field :name, GraphQL::Types::String, null: true,
- description: 'Name of the need.'
+ description: 'Name of the need.'
end
end
end
diff --git a/app/graphql/types/ci/config/stage_type.rb b/app/graphql/types/ci/config/stage_type.rb
index 5b1163edac2..4dacba2f1ed 100644
--- a/app/graphql/types/ci/config/stage_type.rb
+++ b/app/graphql/types/ci/config/stage_type.rb
@@ -8,9 +8,9 @@ module Types
graphql_name 'CiConfigStage'
field :groups, Types::Ci::Config::GroupType.connection_type, null: true,
- description: 'Groups of jobs for the stage.'
+ description: 'Groups of jobs for the stage.'
field :name, GraphQL::Types::String, null: true,
- description: 'Name of the stage.'
+ description: 'Name of the stage.'
end
end
end
diff --git a/app/graphql/types/ci/detailed_status_type.rb b/app/graphql/types/ci/detailed_status_type.rb
index 3fab040cc0b..8bc50e974bb 100644
--- a/app/graphql/types/ci/detailed_status_type.rb
+++ b/app/graphql/types/ci/detailed_status_type.rb
@@ -6,31 +6,33 @@ module Types
class DetailedStatusType < BaseObject
graphql_name 'DetailedStatus'
- field :action, Types::Ci::StatusActionType, null: true,
+ field :action,
+ Types::Ci::StatusActionType,
+ null: true,
calls_gitaly: true,
description: 'Action information for the status. This includes method, button title, icon, path, and title.'
field :details_path, GraphQL::Types::String, null: true,
- description: 'Path of the details for the status.'
+ description: 'Path of the details for the status.'
field :favicon, GraphQL::Types::String, null: true,
- description: 'Favicon of the status.'
+ description: 'Favicon of the status.'
field :group, GraphQL::Types::String, null: true,
- description: 'Group of the status.'
+ description: 'Group of the status.'
field :has_details, GraphQL::Types::Boolean, null: true,
- description: 'Indicates if the status has further details.',
- method: :has_details?
+ description: 'Indicates if the status has further details.',
+ method: :has_details?
field :icon, GraphQL::Types::String, null: true,
- description: 'Icon of the status.'
+ description: 'Icon of the status.'
field :id, GraphQL::Types::String, null: false,
- description: 'ID for a detailed status.',
- extras: [:parent]
+ description: 'ID for a detailed status.',
+ extras: [:parent]
field :label, GraphQL::Types::String, null: true,
- calls_gitaly: true,
- description: 'Label of the status.'
+ calls_gitaly: true,
+ description: 'Label of the status.'
field :text, GraphQL::Types::String, null: true,
- description: 'Text of the status.'
+ description: 'Text of the status.'
field :tooltip, GraphQL::Types::String, null: true,
- description: 'Tooltip associated with the status.',
- method: :status_tooltip
+ description: 'Tooltip associated with the status.',
+ method: :status_tooltip
def id(parent:)
"#{object.id}-#{parent.id}"
diff --git a/app/graphql/types/ci/group_type.rb b/app/graphql/types/ci/group_type.rb
index c3c73ef170c..f2150fa5e1a 100644
--- a/app/graphql/types/ci/group_type.rb
+++ b/app/graphql/types/ci/group_type.rb
@@ -7,15 +7,15 @@ module Types
graphql_name 'CiGroup'
field :detailed_status, Types::Ci::DetailedStatusType, null: true,
- description: 'Detailed status of the group.'
+ description: 'Detailed status of the group.'
field :id, GraphQL::Types::String, null: false,
- description: 'ID for a group.'
+ description: 'ID for a group.'
field :jobs, Ci::JobType.connection_type, null: true,
- description: 'Jobs in group.'
+ description: 'Jobs in group.'
field :name, GraphQL::Types::String, null: true,
- description: 'Name of the job group.'
+ description: 'Name of the job group.'
field :size, GraphQL::Types::Int, null: true,
- description: 'Size of the group.'
+ description: 'Size of the group.'
def detailed_status
object.detailed_status(context[:current_user])
diff --git a/app/graphql/types/ci/group_variable_type.rb b/app/graphql/types/ci/group_variable_type.rb
new file mode 100644
index 00000000000..3322f741342
--- /dev/null
+++ b/app/graphql/types/ci/group_variable_type.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+module Types
+ module Ci
+ # rubocop: disable Graphql/AuthorizeTypes
+ class GroupVariableType < BaseObject
+ graphql_name 'CiGroupVariable'
+ description 'CI/CD variables for a group.'
+
+ implements(VariableInterface)
+
+ field :environment_scope, GraphQL::Types::String,
+ null: true,
+ description: 'Scope defining the environments that can use the variable.'
+
+ field :protected, GraphQL::Types::Boolean,
+ null: true,
+ description: 'Indicates whether the variable is protected.'
+
+ field :masked, GraphQL::Types::Boolean,
+ null: true,
+ description: 'Indicates whether the variable is masked.'
+ end
+ end
+end
diff --git a/app/graphql/types/ci/instance_variable_type.rb b/app/graphql/types/ci/instance_variable_type.rb
new file mode 100644
index 00000000000..f564a2f59a0
--- /dev/null
+++ b/app/graphql/types/ci/instance_variable_type.rb
@@ -0,0 +1,33 @@
+# frozen_string_literal: true
+
+module Types
+ module Ci
+ # rubocop: disable Graphql/AuthorizeTypes
+ class InstanceVariableType < BaseObject
+ graphql_name 'CiInstanceVariable'
+ description 'CI/CD variables for a GitLab instance.'
+
+ implements(VariableInterface)
+
+ field :environment_scope, GraphQL::Types::String,
+ null: true,
+ deprecated: {
+ reason: 'No longer used, only available for GroupVariableType and ProjectVariableType',
+ milestone: '15.3'
+ },
+ description: 'Scope defining the environments that can use the variable.'
+
+ field :protected, GraphQL::Types::Boolean,
+ null: true,
+ description: 'Indicates whether the variable is protected.'
+
+ field :masked, GraphQL::Types::Boolean,
+ null: true,
+ description: 'Indicates whether the variable is masked.'
+
+ def environment_scope
+ nil
+ end
+ end
+ end
+end
diff --git a/app/graphql/types/ci/job_artifact_type.rb b/app/graphql/types/ci/job_artifact_type.rb
index 69bb5325dba..a6ab445702c 100644
--- a/app/graphql/types/ci/job_artifact_type.rb
+++ b/app/graphql/types/ci/job_artifact_type.rb
@@ -7,14 +7,14 @@ module Types
graphql_name 'CiJobArtifact'
field :download_path, GraphQL::Types::String, null: true,
- description: "URL for downloading the artifact's file."
+ description: "URL for downloading the artifact's file."
field :file_type, ::Types::Ci::JobArtifactFileTypeEnum, null: true,
- description: 'File type of the artifact.'
+ description: 'File type of the artifact.'
field :name, GraphQL::Types::String, null: true,
- description: 'File name of the artifact.',
- method: :filename
+ description: 'File name of the artifact.',
+ method: :filename
def download_path
::Gitlab::Routing.url_helpers.download_project_job_artifacts_path(
diff --git a/app/graphql/types/ci/job_token_scope_type.rb b/app/graphql/types/ci/job_token_scope_type.rb
index 9f48298e1d3..37c0af944a7 100644
--- a/app/graphql/types/ci/job_token_scope_type.rb
+++ b/app/graphql/types/ci/job_token_scope_type.rb
@@ -7,9 +7,11 @@ module Types
class JobTokenScopeType < BaseObject
graphql_name 'CiJobTokenScopeType'
- field :projects, Types::ProjectType.connection_type, null: false,
- description: 'Allow list of projects that can be accessed by CI Job tokens created by this project.',
- method: :all_projects
+ field :projects,
+ Types::ProjectType.connection_type,
+ null: false,
+ description: 'Allow list of projects that can be accessed by CI Job tokens created by this project.',
+ method: :all_projects
end
end
# rubocop: enable Graphql/AuthorizeTypes
diff --git a/app/graphql/types/ci/job_type.rb b/app/graphql/types/ci/job_type.rb
index 42b55f47f92..4ea9a016e74 100644
--- a/app/graphql/types/ci/job_type.rb
+++ b/app/graphql/types/ci/job_type.rb
@@ -12,39 +12,39 @@ module Types
expose_permissions Types::PermissionTypes::Ci::Job
field :allow_failure, ::GraphQL::Types::Boolean, null: false,
- description: 'Whether the job is allowed to fail.'
+ description: 'Whether the job is allowed to fail.'
field :duration, GraphQL::Types::Int, null: true,
- description: 'Duration of the job in seconds.'
+ description: 'Duration of the job in seconds.'
field :id, ::Types::GlobalIDType[::CommitStatus].as('JobID'), null: true,
- description: 'ID of the job.'
+ description: 'ID of the job.'
field :kind, type: ::Types::Ci::JobKindEnum, null: false,
- description: 'Indicates the type of job.'
+ description: 'Indicates the type of job.'
field :name, GraphQL::Types::String, null: true,
- description: 'Name of the job.'
+ description: 'Name of the job.'
field :needs, BuildNeedType.connection_type, null: true,
- description: 'References to builds that must complete before the jobs run.'
+ description: 'References to builds that must complete before the jobs run.'
field :pipeline, Types::Ci::PipelineType, null: true,
- description: 'Pipeline the job belongs to.'
+ description: 'Pipeline the job belongs to.'
field :stage, Types::Ci::StageType, null: true,
- description: 'Stage of the job.'
+ description: 'Stage of the job.'
field :status,
type: ::Types::Ci::JobStatusEnum,
null: true,
description: "Status of the job."
field :tags, [GraphQL::Types::String], null: true,
- description: 'Tags for the current job.'
+ description: 'Tags for the current job.'
# Life-cycle timestamps:
field :created_at, Types::TimeType, null: false,
- description: "When the job was created."
+ description: "When the job was created."
field :finished_at, Types::TimeType, null: true,
- description: 'When a job has finished running.'
+ description: 'When a job has finished running.'
field :queued_at, Types::TimeType, null: true,
- description: 'When the job was enqueued and marked as pending.'
+ description: 'When the job was enqueued and marked as pending.'
field :scheduled_at, Types::TimeType, null: true,
- description: 'Schedule for the build.'
+ description: 'Schedule for the build.'
field :started_at, Types::TimeType, null: true,
- description: 'When the job was started.'
+ description: 'When the job was started.'
# Life-cycle durations:
field :queued_duration,
@@ -53,45 +53,45 @@ module Types
description: 'How long the job was enqueued before starting.'
field :active, GraphQL::Types::Boolean, null: false, method: :active?,
- description: 'Indicates the job is active.'
+ description: 'Indicates the job is active.'
field :artifacts, Types::Ci::JobArtifactType.connection_type, null: true,
- description: 'Artifacts generated by the job.'
+ description: 'Artifacts generated by the job.'
field :cancelable, GraphQL::Types::Boolean, null: false, method: :cancelable?,
- description: 'Indicates the job can be canceled.'
+ description: 'Indicates the job can be canceled.'
field :commit_path, GraphQL::Types::String, null: true,
- description: 'Path to the commit that triggered the job.'
+ description: 'Path to the commit that triggered the job.'
field :coverage, GraphQL::Types::Float, null: true,
- description: 'Coverage level of the job.'
+ description: 'Coverage level of the job.'
field :created_by_tag, GraphQL::Types::Boolean, null: false,
- description: 'Whether the job was created by a tag.', method: :tag?
+ description: 'Whether the job was created by a tag.', method: :tag?
field :detailed_status, Types::Ci::DetailedStatusType, null: true,
- description: 'Detailed status of the job.'
+ description: 'Detailed status of the job.'
field :downstream_pipeline, Types::Ci::PipelineType, null: true,
- description: 'Downstream pipeline for a bridge.'
+ description: 'Downstream pipeline for a bridge.'
field :manual_job, GraphQL::Types::Boolean, null: true,
- description: 'Whether the job has a manual action.'
- field :manual_variables, VariableType.connection_type, null: true,
- description: 'Variables added to a manual job when the job is triggered.'
+ description: 'Whether the job has a manual action.'
+ field :manual_variables, ManualVariableType.connection_type, null: true,
+ description: 'Variables added to a manual job when the job is triggered.'
field :playable, GraphQL::Types::Boolean, null: false, method: :playable?,
- description: 'Indicates the job can be played.'
+ description: 'Indicates the job can be played.'
field :previous_stage_jobs_or_needs, Types::Ci::JobNeedUnion.connection_type, null: true,
- description: 'Jobs that must complete before the job runs. Returns `BuildNeed`, which is the needed jobs if the job uses the `needs` keyword, or the previous stage jobs otherwise.'
+ description: 'Jobs that must complete before the job runs. Returns `BuildNeed`, which is the needed jobs if the job uses the `needs` keyword, or the previous stage jobs otherwise.'
field :ref_name, GraphQL::Types::String, null: true,
- description: 'Ref name of the job.'
+ description: 'Ref name of the job.'
field :ref_path, GraphQL::Types::String, null: true,
- description: 'Path to the ref.'
+ description: 'Path to the ref.'
field :retried, GraphQL::Types::Boolean, null: true,
- description: 'Indicates that the job has been retried.'
+ description: 'Indicates that the job has been retried.'
field :retryable, GraphQL::Types::Boolean, null: false, method: :retryable?,
- description: 'Indicates the job can be retried.'
+ description: 'Indicates the job can be retried.'
field :scheduling_type, GraphQL::Types::String, null: true,
- description: 'Type of job scheduling. Value is `dag` if the job uses the `needs` keyword, and `stage` otherwise.'
+ description: 'Type of job scheduling. Value is `dag` if the job uses the `needs` keyword, and `stage` otherwise.'
field :short_sha, type: GraphQL::Types::String, null: false,
- description: 'Short SHA1 ID of the commit.'
+ description: 'Short SHA1 ID of the commit.'
field :stuck, GraphQL::Types::Boolean, null: false, method: :stuck?,
- description: 'Indicates the job is stuck.'
+ description: 'Indicates the job is stuck.'
field :triggered, GraphQL::Types::Boolean, null: true,
- description: 'Whether the job was triggered.'
+ description: 'Whether the job was triggered.'
def kind
return ::Ci::Build unless [::Ci::Build, ::Ci::Bridge].include?(object.class)
@@ -194,7 +194,7 @@ module Types
end
def manual_variables
- if object.manual? && object.respond_to?(:job_variables)
+ if object.action? && object.respond_to?(:job_variables)
object.job_variables
else
[]
diff --git a/app/graphql/types/ci/manual_variable_type.rb b/app/graphql/types/ci/manual_variable_type.rb
new file mode 100644
index 00000000000..d6f59c1d249
--- /dev/null
+++ b/app/graphql/types/ci/manual_variable_type.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+module Types
+ module Ci
+ # rubocop: disable Graphql/AuthorizeTypes
+ class ManualVariableType < BaseObject
+ graphql_name 'CiManualVariable'
+ description 'CI/CD variables given to a manual job.'
+
+ implements(VariableInterface)
+
+ field :environment_scope, GraphQL::Types::String,
+ null: true,
+ deprecated: {
+ reason: 'No longer used, only available for GroupVariableType and ProjectVariableType',
+ milestone: '15.3'
+ },
+ description: 'Scope defining the environments that can use the variable.'
+
+ def environment_scope
+ nil
+ end
+ end
+ end
+end
diff --git a/app/graphql/types/ci/pipeline_message_type.rb b/app/graphql/types/ci/pipeline_message_type.rb
index 7edea1901a1..35164b0894a 100644
--- a/app/graphql/types/ci/pipeline_message_type.rb
+++ b/app/graphql/types/ci/pipeline_message_type.rb
@@ -7,10 +7,10 @@ module Types
graphql_name 'PipelineMessage'
field :id, GraphQL::Types::ID, null: false,
- description: 'ID of the pipeline message.'
+ description: 'ID of the pipeline message.'
field :content, GraphQL::Types::String, null: false,
- description: 'Content of the pipeline message.'
+ description: 'Content of the pipeline message.'
end
end
end
diff --git a/app/graphql/types/ci/pipeline_type.rb b/app/graphql/types/ci/pipeline_type.rb
index 60418fec6c5..4a523f2edd9 100644
--- a/app/graphql/types/ci/pipeline_type.rb
+++ b/app/graphql/types/ci/pipeline_type.rb
@@ -13,14 +13,14 @@ module Types
expose_permissions Types::PermissionTypes::Ci::Pipeline
field :id, GraphQL::Types::ID, null: false,
- description: 'ID of the pipeline.'
+ description: 'ID of the pipeline.'
field :iid, GraphQL::Types::String, null: false,
- description: 'Internal ID of the pipeline.'
+ description: 'Internal ID of the pipeline.'
field :sha, GraphQL::Types::String, null: true,
- method: :sha,
- description: "SHA of the pipeline's commit." do
+ method: :sha,
+ description: "SHA of the pipeline's commit." do
argument :format,
type: Types::ShaFormatEnum,
required: false,
@@ -28,46 +28,46 @@ module Types
end
field :before_sha, GraphQL::Types::String, null: true,
- description: 'Base SHA of the source branch.'
+ description: 'Base SHA of the source branch.'
field :complete, GraphQL::Types::Boolean, null: false, method: :complete?,
- description: 'Indicates if a pipeline is complete.'
+ description: 'Indicates if a pipeline is complete.'
field :status, PipelineStatusEnum, null: false,
- description: "Status of the pipeline (#{::Ci::Pipeline.all_state_names.compact.join(', ').upcase})"
+ description: "Status of the pipeline (#{::Ci::Pipeline.all_state_names.compact.join(', ').upcase})"
field :warnings, GraphQL::Types::Boolean, null: false, method: :has_warnings?,
- description: "Indicates if a pipeline has warnings."
+ description: "Indicates if a pipeline has warnings."
field :detailed_status, Types::Ci::DetailedStatusType, null: false,
- description: 'Detailed status of the pipeline.'
+ description: 'Detailed status of the pipeline.'
field :config_source, PipelineConfigSourceEnum, null: true,
- description: "Configuration source of the pipeline (#{::Enums::Ci::Pipeline.config_sources.keys.join(', ').upcase})"
+ description: "Configuration source of the pipeline (#{::Enums::Ci::Pipeline.config_sources.keys.join(', ').upcase})"
field :duration, GraphQL::Types::Int, null: true,
- description: 'Duration of the pipeline in seconds.'
+ description: 'Duration of the pipeline in seconds.'
field :queued_duration, Types::DurationType, null: true,
- description: 'How long the pipeline was queued before starting.'
+ description: 'How long the pipeline was queued before starting.'
field :coverage, GraphQL::Types::Float, null: true,
- description: 'Coverage percentage.'
+ description: 'Coverage percentage.'
field :created_at, Types::TimeType, null: false,
- description: "Timestamp of the pipeline's creation."
+ description: "Timestamp of the pipeline's creation."
field :updated_at, Types::TimeType, null: false,
- description: "Timestamp of the pipeline's last activity."
+ description: "Timestamp of the pipeline's last activity."
field :started_at, Types::TimeType, null: true,
- description: 'Timestamp when the pipeline was started.'
+ description: 'Timestamp when the pipeline was started.'
field :finished_at, Types::TimeType, null: true,
- description: "Timestamp of the pipeline's completion."
+ description: "Timestamp of the pipeline's completion."
field :committed_at, Types::TimeType, null: true,
- description: "Timestamp of the pipeline's commit."
+ description: "Timestamp of the pipeline's commit."
field :stages,
type: Types::Ci::StageType.connection_type,
@@ -126,32 +126,32 @@ module Types
description: 'Job where pipeline was triggered from.'
field :downstream, Types::Ci::PipelineType.connection_type, null: true,
- description: 'Pipelines this pipeline will trigger.',
- method: :triggered_pipelines_with_preloads
+ description: 'Pipelines this pipeline will trigger.',
+ method: :triggered_pipelines_with_preloads
field :upstream, Types::Ci::PipelineType, null: true,
- description: 'Pipeline that triggered the pipeline.',
- method: :triggered_by_pipeline
+ description: 'Pipeline that triggered the pipeline.',
+ method: :triggered_by_pipeline
field :path, GraphQL::Types::String, null: true,
- description: "Relative path to the pipeline's page."
+ description: "Relative path to the pipeline's page."
field :commit, Types::CommitType, null: true,
- description: "Git commit of the pipeline.",
- calls_gitaly: true
+ description: "Git commit of the pipeline.",
+ calls_gitaly: true
field :commit_path, GraphQL::Types::String, null: true,
- description: 'Path to the commit that triggered the pipeline.'
+ description: 'Path to the commit that triggered the pipeline.'
field :project, Types::ProjectType, null: true,
- description: 'Project the pipeline belongs to.'
+ description: 'Project the pipeline belongs to.'
field :active, GraphQL::Types::Boolean, null: false, method: :active?,
- description: 'Indicates if the pipeline is active.'
+ description: 'Indicates if the pipeline is active.'
field :uses_needs, GraphQL::Types::Boolean, null: true,
- method: :uses_needs?,
- description: 'Indicates if the pipeline has jobs with `needs` dependencies.'
+ method: :uses_needs?,
+ description: 'Indicates if the pipeline has jobs with `needs` dependencies.'
field :test_report_summary,
Types::Ci::TestReportSummaryType,
@@ -166,17 +166,17 @@ module Types
resolver: Resolvers::Ci::TestSuiteResolver
field :ref, GraphQL::Types::String, null: true,
- description: 'Reference to the branch from which the pipeline was triggered.'
+ description: 'Reference to the branch from which the pipeline was triggered.'
field :ref_path, GraphQL::Types::String, null: true,
- description: 'Reference path to the branch from which the pipeline was triggered.',
- method: :source_ref_path
+ description: 'Reference path to the branch from which the pipeline was triggered.',
+ method: :source_ref_path
field :warning_messages, [Types::Ci::PipelineMessageType], null: true,
- description: 'Pipeline warning messages.'
+ description: 'Pipeline warning messages.'
field :merge_request_event_type, Types::Ci::PipelineMergeRequestEventTypeEnum, null: true,
- description: "Event type of the pipeline associated with a merge request."
+ description: "Event type of the pipeline associated with a merge request."
def detailed_status
object.detailed_status(current_user)
@@ -200,7 +200,7 @@ module Types
if id
pipeline.statuses.id_in(id.model_id)
else
- pipeline.statuses.by_name(name)
+ pipeline.latest_statuses.by_name(name)
end.take # rubocop: disable CodeReuse/ActiveRecord
end
diff --git a/app/graphql/types/ci/project_variable_type.rb b/app/graphql/types/ci/project_variable_type.rb
new file mode 100644
index 00000000000..625bb7fd4b1
--- /dev/null
+++ b/app/graphql/types/ci/project_variable_type.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+module Types
+ module Ci
+ # rubocop: disable Graphql/AuthorizeTypes
+ class ProjectVariableType < BaseObject
+ graphql_name 'CiProjectVariable'
+ description 'CI/CD variables for a project.'
+
+ implements(VariableInterface)
+
+ field :environment_scope, GraphQL::Types::String,
+ null: true,
+ description: 'Scope defining the environments that can use the variable.'
+
+ field :protected, GraphQL::Types::Boolean,
+ null: true,
+ description: 'Indicates whether the variable is protected.'
+
+ field :masked, GraphQL::Types::Boolean,
+ null: true,
+ description: 'Indicates whether the variable is masked.'
+ end
+ end
+end
diff --git a/app/graphql/types/ci/recent_failures_type.rb b/app/graphql/types/ci/recent_failures_type.rb
index f56b0939086..0892cb2735c 100644
--- a/app/graphql/types/ci/recent_failures_type.rb
+++ b/app/graphql/types/ci/recent_failures_type.rb
@@ -10,10 +10,10 @@ module Types
connection_type_class(Types::CountableConnectionType)
field :count, GraphQL::Types::Int, null: true,
- description: 'Number of times the test case has failed in the past 14 days.'
+ description: 'Number of times the test case has failed in the past 14 days.'
field :base_branch, GraphQL::Types::String, null: true,
- description: 'Name of the base branch of the project.'
+ description: 'Name of the base branch of the project.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
diff --git a/app/graphql/types/ci/runner_architecture_type.rb b/app/graphql/types/ci/runner_architecture_type.rb
index eb576cf09ce..8b0558fc6a6 100644
--- a/app/graphql/types/ci/runner_architecture_type.rb
+++ b/app/graphql/types/ci/runner_architecture_type.rb
@@ -6,10 +6,12 @@ module Types
class RunnerArchitectureType < BaseObject
graphql_name 'RunnerArchitecture'
- field :download_location, GraphQL::Types::String, null: false,
- description: 'Download location for the runner for the platform architecture.'
+ field :download_location,
+ GraphQL::Types::String,
+ null: false,
+ description: 'Download location for the runner for the platform architecture.'
field :name, GraphQL::Types::String, null: false,
- description: 'Name of the runner platform architecture.'
+ description: 'Name of the runner platform architecture.'
end
end
end
diff --git a/app/graphql/types/ci/runner_platform_type.rb b/app/graphql/types/ci/runner_platform_type.rb
index 3c893615b20..1e481cc08bf 100644
--- a/app/graphql/types/ci/runner_platform_type.rb
+++ b/app/graphql/types/ci/runner_platform_type.rb
@@ -6,12 +6,14 @@ module Types
class RunnerPlatformType < BaseObject
graphql_name 'RunnerPlatform'
- field :architectures, Types::Ci::RunnerArchitectureType.connection_type, null: true,
- description: 'Runner architectures supported for the platform.'
+ field :architectures,
+ Types::Ci::RunnerArchitectureType.connection_type,
+ null: true,
+ description: 'Runner architectures supported for the platform.'
field :human_readable_name, GraphQL::Types::String, null: false,
- description: 'Human readable name of the runner platform.'
+ description: 'Human readable name of the runner platform.'
field :name, GraphQL::Types::String, null: false,
- description: 'Name slug of the runner platform.'
+ description: 'Name slug of the runner platform.'
end
end
end
diff --git a/app/graphql/types/ci/runner_setup_type.rb b/app/graphql/types/ci/runner_setup_type.rb
index b6b020db40e..5328ac8f21f 100644
--- a/app/graphql/types/ci/runner_setup_type.rb
+++ b/app/graphql/types/ci/runner_setup_type.rb
@@ -7,9 +7,9 @@ module Types
graphql_name 'RunnerSetup'
field :install_instructions, GraphQL::Types::String, null: false,
- description: 'Instructions for installing the runner on the specified architecture.'
+ description: 'Instructions for installing the runner on the specified architecture.'
field :register_instructions, GraphQL::Types::String, null: true,
- description: 'Instructions for registering the runner. The actual registration tokens are not included in the commands. Instead, a placeholder `$REGISTRATION_TOKEN` is shown.'
+ description: 'Instructions for registering the runner. The actual registration tokens are not included in the commands. Instead, a placeholder `$REGISTRATION_TOKEN` is shown.'
end
end
end
diff --git a/app/graphql/types/ci/runner_type.rb b/app/graphql/types/ci/runner_type.rb
index ac5ffd39407..0afb61d2b64 100644
--- a/app/graphql/types/ci/runner_type.rb
+++ b/app/graphql/types/ci/runner_type.rb
@@ -17,77 +17,77 @@ module Types
alias_method :runner, :object
field :access_level, ::Types::Ci::RunnerAccessLevelEnum, null: false,
- description: 'Access level of the runner.'
+ description: 'Access level of the runner.'
field :active, GraphQL::Types::Boolean, null: false,
- description: 'Indicates the runner is allowed to receive jobs.',
- deprecated: { reason: 'Use paused', milestone: '14.8' }
+ description: 'Indicates the runner is allowed to receive jobs.',
+ deprecated: { reason: 'Use paused', milestone: '14.8' }
field :admin_url, GraphQL::Types::String, null: true,
- description: 'Admin URL of the runner. Only available for administrators.'
+ description: 'Admin URL of the runner. Only available for administrators.'
field :contacted_at, Types::TimeType, null: true,
- description: 'Timestamp of last contact from this runner.',
- method: :contacted_at
+ description: 'Timestamp of last contact from this runner.',
+ method: :contacted_at
field :created_at, Types::TimeType, null: true,
- description: 'Timestamp of creation of this runner.'
+ description: 'Timestamp of creation of this runner.'
field :description, GraphQL::Types::String, null: true,
- description: 'Description of the runner.'
+ description: 'Description of the runner.'
field :edit_admin_url, GraphQL::Types::String, null: true,
- description: 'Admin form URL of the runner. Only available for administrators.'
+ description: 'Admin form URL of the runner. Only available for administrators.'
field :executor_name, GraphQL::Types::String, null: true,
- description: 'Executor last advertised by the runner.',
- method: :executor_name
+ description: 'Executor last advertised by the runner.',
+ method: :executor_name
field :platform_name, GraphQL::Types::String, null: true,
- description: 'Platform provided by the runner.',
- method: :platform
+ description: 'Platform provided by the runner.',
+ method: :platform
field :architecture_name, GraphQL::Types::String, null: true,
- description: 'Architecture provided by the the runner.',
- method: :architecture
+ description: 'Architecture provided by the the runner.',
+ method: :architecture
field :maintenance_note, GraphQL::Types::String, null: true,
- description: 'Runner\'s maintenance notes.'
+ description: 'Runner\'s maintenance notes.'
field :groups, ::Types::GroupType.connection_type, null: true,
- description: 'Groups the runner is associated with. For group runners only.'
+ description: 'Groups the runner is associated with. For group runners only.'
field :id, ::Types::GlobalIDType[::Ci::Runner], null: false,
- description: 'ID of the runner.'
+ description: 'ID of the runner.'
field :ip_address, GraphQL::Types::String, null: true,
- description: 'IP address of the runner.'
+ description: 'IP address of the runner.'
field :job_count, GraphQL::Types::Int, null: true,
- description: "Number of jobs processed by the runner (limited to #{JOB_COUNT_LIMIT}, plus one to indicate that more items exist)."
+ description: "Number of jobs processed by the runner (limited to #{JOB_COUNT_LIMIT}, plus one to indicate that more items exist)."
field :jobs, ::Types::Ci::JobType.connection_type, null: true,
- description: 'Jobs assigned to the runner.',
- authorize: :read_builds,
- resolver: ::Resolvers::Ci::RunnerJobsResolver
+ description: 'Jobs assigned to the runner.',
+ authorize: :read_builds,
+ resolver: ::Resolvers::Ci::RunnerJobsResolver
field :locked, GraphQL::Types::Boolean, null: true,
- description: 'Indicates the runner is locked.'
+ description: 'Indicates the runner is locked.'
field :maximum_timeout, GraphQL::Types::Int, null: true,
- description: 'Maximum timeout (in seconds) for jobs processed by the runner.'
+ description: 'Maximum timeout (in seconds) for jobs processed by the runner.'
field :paused, GraphQL::Types::Boolean, null: false,
- description: 'Indicates the runner is paused and not available to run jobs.'
+ description: 'Indicates the runner is paused and not available to run jobs.'
field :project_count, GraphQL::Types::Int, null: true,
- description: 'Number of projects that the runner is associated with.'
+ description: 'Number of projects that the runner is associated with.'
field :projects, ::Types::ProjectType.connection_type, null: true,
- description: 'Projects the runner is associated with. For project runners only.'
+ description: 'Projects the runner is associated with. For project runners only.'
field :revision, GraphQL::Types::String, null: true,
- description: 'Revision of the runner.'
+ description: 'Revision of the runner.'
field :run_untagged, GraphQL::Types::Boolean, null: false,
- description: 'Indicates the runner is able to run untagged jobs.'
+ description: 'Indicates the runner is able to run untagged jobs.'
field :runner_type, ::Types::Ci::RunnerTypeEnum, null: false,
- description: 'Type of the runner.'
+ description: 'Type of the runner.'
field :short_sha, GraphQL::Types::String, null: true,
- description: %q(First eight characters of the runner's token used to authenticate new job requests. Used as the runner's unique ID.)
+ description: %q(First eight characters of the runner's token used to authenticate new job requests. Used as the runner's unique ID.)
field :status,
Types::Ci::RunnerStatusEnum,
null: false,
description: 'Status of the runner.',
resolver: ::Resolvers::Ci::RunnerStatusResolver # TODO: Remove :resolver in %17.0
field :tag_list, [GraphQL::Types::String], null: true,
- description: 'Tags associated with the runner.'
+ description: 'Tags associated with the runner.'
field :token_expires_at, Types::TimeType, null: true,
- description: 'Runner token expiration time.',
- method: :token_expires_at
+ description: 'Runner token expiration time.',
+ method: :token_expires_at
field :version, GraphQL::Types::String, null: true,
- description: 'Version of the runner.'
+ description: 'Version of the runner.'
field :owner_project, ::Types::ProjectType, null: true,
- description: 'Project that owns the runner. For project runners only.',
- resolver: ::Resolvers::Ci::RunnerOwnerProjectResolver
+ description: 'Project that owns the runner. For project runners only.',
+ resolver: ::Resolvers::Ci::RunnerOwnerProjectResolver
markdown_field :maintenance_note_html, null: true
diff --git a/app/graphql/types/ci/runner_upgrade_status_type_enum.rb b/app/graphql/types/ci/runner_upgrade_status_enum.rb
index 8e32eee5e6e..34a931c8f79 100644
--- a/app/graphql/types/ci/runner_upgrade_status_type_enum.rb
+++ b/app/graphql/types/ci/runner_upgrade_status_enum.rb
@@ -2,8 +2,8 @@
module Types
module Ci
- class RunnerUpgradeStatusTypeEnum < BaseEnum
- graphql_name 'CiRunnerUpgradeStatusType'
+ class RunnerUpgradeStatusEnum < BaseEnum
+ graphql_name 'CiRunnerUpgradeStatus'
::Ci::RunnerVersion::STATUS_DESCRIPTIONS.each do |status, description|
status_name_src =
diff --git a/app/graphql/types/ci/runner_web_url_edge.rb b/app/graphql/types/ci/runner_web_url_edge.rb
index 7dfcd1f3510..9255e59267c 100644
--- a/app/graphql/types/ci/runner_web_url_edge.rb
+++ b/app/graphql/types/ci/runner_web_url_edge.rb
@@ -5,11 +5,11 @@ module Types
# rubocop: disable Graphql/AuthorizeTypes
class RunnerWebUrlEdge < ::Types::BaseEdge
field :edit_url, GraphQL::Types::String, null: true,
- description: 'Web URL of the runner edit page. The value depends on where you put this field in the query. You can use it for projects or groups.',
- extras: [:parent]
+ description: 'Web URL of the runner edit page. The value depends on where you put this field in the query. You can use it for projects or groups.',
+ extras: [:parent]
field :web_url, GraphQL::Types::String, null: true,
- description: 'Web URL of the runner. The value depends on where you put this field in the query. You can use it for projects or groups.',
- extras: [:parent]
+ description: 'Web URL of the runner. The value depends on where you put this field in the query. You can use it for projects or groups.',
+ extras: [:parent]
def initialize(node, connection)
super
diff --git a/app/graphql/types/ci/stage_type.rb b/app/graphql/types/ci/stage_type.rb
index dcb3092d15a..c0f3d1db57b 100644
--- a/app/graphql/types/ci/stage_type.rb
+++ b/app/graphql/types/ci/stage_type.rb
@@ -7,16 +7,16 @@ module Types
authorize :read_build
field :detailed_status, Types::Ci::DetailedStatusType, null: true,
- description: 'Detailed status of the stage.'
+ description: 'Detailed status of the stage.'
field :groups, type: Ci::GroupType.connection_type, null: true,
- extras: [:lookahead],
- description: 'Group of jobs for the stage.'
+ extras: [:lookahead],
+ description: 'Group of jobs for the stage.'
field :id, GraphQL::Types::ID, null: false,
- description: 'ID of the stage.'
+ description: 'ID of the stage.'
field :jobs, Types::Ci::JobType.connection_type, null: true,
- description: 'Jobs for the stage.'
+ description: 'Jobs for the stage.'
field :name, type: GraphQL::Types::String, null: true,
- description: 'Name of the stage.'
+ description: 'Name of the stage.'
field :status, GraphQL::Types::String,
null: true,
description: 'Status of the pipeline stage.'
diff --git a/app/graphql/types/ci/status_action_type.rb b/app/graphql/types/ci/status_action_type.rb
index c0f61cf49f2..45773be49e2 100644
--- a/app/graphql/types/ci/status_action_type.rb
+++ b/app/graphql/types/ci/status_action_type.rb
@@ -6,19 +6,19 @@ module Types
graphql_name 'StatusAction'
field :button_title, GraphQL::Types::String, null: true,
- description: 'Title for the button, for example: Retry this job.'
+ description: 'Title for the button, for example: Retry this job.'
field :icon, GraphQL::Types::String, null: true,
- description: 'Icon used in the action button.'
+ description: 'Icon used in the action button.'
field :id, GraphQL::Types::String, null: false,
- description: 'ID for a status action.',
- extras: [:parent]
+ description: 'ID for a status action.',
+ extras: [:parent]
field :method, GraphQL::Types::String, null: true,
- description: 'Method for the action, for example: :post.',
- resolver_method: :action_method
+ description: 'Method for the action, for example: :post.',
+ resolver_method: :action_method
field :path, GraphQL::Types::String, null: true,
- description: 'Path for the action.'
+ description: 'Path for the action.'
field :title, GraphQL::Types::String, null: true,
- description: 'Title for the action, for example: Retry.'
+ description: 'Title for the action, for example: Retry.'
def id(parent:)
# parent is a SimpleDelegator
diff --git a/app/graphql/types/ci/template_type.rb b/app/graphql/types/ci/template_type.rb
index 4f1ec6436de..91e10c619c8 100644
--- a/app/graphql/types/ci/template_type.rb
+++ b/app/graphql/types/ci/template_type.rb
@@ -8,9 +8,9 @@ module Types
description 'GitLab CI/CD configuration template.'
field :content, GraphQL::Types::String, null: false,
- description: 'Contents of the CI template.'
+ description: 'Contents of the CI template.'
field :name, GraphQL::Types::String, null: false,
- description: 'Name of the CI template.'
+ description: 'Name of the CI template.'
end
end
end
diff --git a/app/graphql/types/ci/test_case_type.rb b/app/graphql/types/ci/test_case_type.rb
index 6e5f55aa3ed..f88923215eb 100644
--- a/app/graphql/types/ci/test_case_type.rb
+++ b/app/graphql/types/ci/test_case_type.rb
@@ -9,32 +9,36 @@ module Types
connection_type_class(Types::CountableConnectionType)
- field :status, Types::Ci::TestCaseStatusEnum, null: true,
- description: "Status of the test case (#{::Gitlab::Ci::Reports::TestCase::STATUS_TYPES.join(', ')})."
+ field :status,
+ Types::Ci::TestCaseStatusEnum,
+ null: true,
+ description: "Status of the test case (#{::Gitlab::Ci::Reports::TestCase::STATUS_TYPES.join(', ')})."
field :name, GraphQL::Types::String, null: true,
- description: 'Name of the test case.'
+ description: 'Name of the test case.'
field :classname, GraphQL::Types::String, null: true,
- description: 'Classname of the test case.'
+ description: 'Classname of the test case.'
field :execution_time, GraphQL::Types::Float, null: true,
- description: 'Test case execution time in seconds.'
+ description: 'Test case execution time in seconds.'
field :file, GraphQL::Types::String, null: true,
- description: 'Path to the file of the test case.'
+ description: 'Path to the file of the test case.'
field :attachment_url, GraphQL::Types::String, null: true,
- description: 'URL of the test case attachment file.'
+ description: 'URL of the test case attachment file.'
field :system_output, GraphQL::Types::String, null: true,
- description: 'System output of the test case.'
+ description: 'System output of the test case.'
field :stack_trace, GraphQL::Types::String, null: true,
- description: 'Stack trace of the test case.'
+ description: 'Stack trace of the test case.'
- field :recent_failures, Types::Ci::RecentFailuresType, null: true,
- description: 'Recent failure history of the test case on the base branch.'
+ field :recent_failures,
+ Types::Ci::RecentFailuresType,
+ null: true,
+ description: 'Recent failure history of the test case on the base branch.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
diff --git a/app/graphql/types/ci/test_report_summary_type.rb b/app/graphql/types/ci/test_report_summary_type.rb
index 87207c8a765..e3577f4fa8f 100644
--- a/app/graphql/types/ci/test_report_summary_type.rb
+++ b/app/graphql/types/ci/test_report_summary_type.rb
@@ -9,10 +9,12 @@ module Types
description 'Test report for a pipeline'
field :total, Types::Ci::TestReportTotalType, null: false,
- description: 'Total report statistics for a pipeline test report.'
+ description: 'Total report statistics for a pipeline test report.'
- field :test_suites, Types::Ci::TestSuiteSummaryType.connection_type, null: false,
- description: 'Test suites belonging to a pipeline test report.'
+ field :test_suites,
+ Types::Ci::TestSuiteSummaryType.connection_type,
+ null: false,
+ description: 'Test suites belonging to a pipeline test report.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
diff --git a/app/graphql/types/ci/test_report_total_type.rb b/app/graphql/types/ci/test_report_total_type.rb
index 48aea1257c5..54959d5173f 100644
--- a/app/graphql/types/ci/test_report_total_type.rb
+++ b/app/graphql/types/ci/test_report_total_type.rb
@@ -8,25 +8,25 @@ module Types
description 'Total test report statistics.'
field :time, GraphQL::Types::Float, null: true,
- description: 'Total duration of the tests.'
+ description: 'Total duration of the tests.'
field :count, GraphQL::Types::Int, null: true,
- description: 'Total number of the test cases.'
+ description: 'Total number of the test cases.'
field :success, GraphQL::Types::Int, null: true,
- description: 'Total number of test cases that succeeded.'
+ description: 'Total number of test cases that succeeded.'
field :failed, GraphQL::Types::Int, null: true,
- description: 'Total number of test cases that failed.'
+ description: 'Total number of test cases that failed.'
field :skipped, GraphQL::Types::Int, null: true,
- description: 'Total number of test cases that were skipped.'
+ description: 'Total number of test cases that were skipped.'
field :error, GraphQL::Types::Int, null: true,
- description: 'Total number of test cases that had an error.'
+ description: 'Total number of test cases that had an error.'
field :suite_error, GraphQL::Types::String, null: true,
- description: 'Test suite error message.'
+ description: 'Test suite error message.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
diff --git a/app/graphql/types/ci/test_suite_summary_type.rb b/app/graphql/types/ci/test_suite_summary_type.rb
index ec7b852213b..8801501c8d4 100644
--- a/app/graphql/types/ci/test_suite_summary_type.rb
+++ b/app/graphql/types/ci/test_suite_summary_type.rb
@@ -10,31 +10,37 @@ module Types
connection_type_class(Types::CountableConnectionType)
field :name, GraphQL::Types::String, null: true,
- description: 'Name of the test suite.'
+ description: 'Name of the test suite.'
field :total_time, GraphQL::Types::Float, null: true,
- description: 'Total duration of the tests in the test suite.'
+ description: 'Total duration of the tests in the test suite.'
field :total_count, GraphQL::Types::Int, null: true,
- description: 'Total number of the test cases in the test suite.'
+ description: 'Total number of the test cases in the test suite.'
- field :success_count, GraphQL::Types::Int, null: true,
- description: 'Total number of test cases that succeeded in the test suite.'
+ field :success_count,
+ GraphQL::Types::Int,
+ null: true,
+ description: 'Total number of test cases that succeeded in the test suite.'
- field :failed_count, GraphQL::Types::Int, null: true,
- description: 'Total number of test cases that failed in the test suite.'
+ field :failed_count,
+ GraphQL::Types::Int,
+ null: true,
+ description: 'Total number of test cases that failed in the test suite.'
- field :skipped_count, GraphQL::Types::Int, null: true,
- description: 'Total number of test cases that were skipped in the test suite.'
+ field :skipped_count,
+ GraphQL::Types::Int,
+ null: true,
+ description: 'Total number of test cases that were skipped in the test suite.'
field :error_count, GraphQL::Types::Int, null: true,
- description: 'Total number of test cases that had an error.'
+ description: 'Total number of test cases that had an error.'
field :suite_error, GraphQL::Types::String, null: true,
- description: 'Test suite error message.'
+ description: 'Test suite error message.'
field :build_ids, [GraphQL::Types::ID], null: true,
- description: 'IDs of the builds used to run the test suite.'
+ description: 'IDs of the builds used to run the test suite.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
diff --git a/app/graphql/types/ci/test_suite_type.rb b/app/graphql/types/ci/test_suite_type.rb
index 7ce479632cc..8845338ed6d 100644
--- a/app/graphql/types/ci/test_suite_type.rb
+++ b/app/graphql/types/ci/test_suite_type.rb
@@ -10,31 +10,36 @@ module Types
connection_type_class(Types::CountableConnectionType)
field :name, GraphQL::Types::String, null: true,
- description: 'Name of the test suite.'
+ description: 'Name of the test suite.'
field :total_time, GraphQL::Types::Float, null: true,
- description: 'Total duration of the tests in the test suite.'
+ description: 'Total duration of the tests in the test suite.'
field :total_count, GraphQL::Types::Int, null: true,
- description: 'Total number of the test cases in the test suite.'
+ description: 'Total number of the test cases in the test suite.'
- field :success_count, GraphQL::Types::Int, null: true,
- description: 'Total number of test cases that succeeded in the test suite.'
+ field :success_count,
+ GraphQL::Types::Int,
+ null: true,
+ description: 'Total number of test cases that succeeded in the test suite.'
- field :failed_count, GraphQL::Types::Int, null: true,
- description: 'Total number of test cases that failed in the test suite.'
+ field :failed_count,
+ GraphQL::Types::Int,
+ null: true,
+ description: 'Total number of test cases that failed in the test suite.'
- field :skipped_count, GraphQL::Types::Int, null: true,
- description: 'Total number of test cases that were skipped in the test suite.'
+ field :skipped_count,
+ GraphQL::Types::Int, null: true,
+ description: 'Total number of test cases that were skipped in the test suite.'
field :error_count, GraphQL::Types::Int, null: true,
- description: 'Total number of test cases that had an error.'
+ description: 'Total number of test cases that had an error.'
field :suite_error, GraphQL::Types::String, null: true,
- description: 'Test suite error message.'
+ description: 'Test suite error message.'
field :test_cases, Types::Ci::TestCaseType.connection_type, null: true,
- description: 'Test cases in the test suite.'
+ description: 'Test cases in the test suite.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
diff --git a/app/graphql/types/ci/variable_input_type.rb b/app/graphql/types/ci/variable_input_type.rb
new file mode 100644
index 00000000000..193ca6ffe4e
--- /dev/null
+++ b/app/graphql/types/ci/variable_input_type.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+module Types
+ module Ci
+ class VariableInputType < BaseInputObject
+ graphql_name 'CiVariableInput'
+ description 'Attributes for defining a CI/CD variable.'
+
+ argument :key, GraphQL::Types::String, description: 'Name of the variable.'
+ argument :value, GraphQL::Types::String, description: 'Value of the variable.'
+ end
+ end
+end
diff --git a/app/graphql/types/ci/variable_interface.rb b/app/graphql/types/ci/variable_interface.rb
new file mode 100644
index 00000000000..82c9ba7121c
--- /dev/null
+++ b/app/graphql/types/ci/variable_interface.rb
@@ -0,0 +1,31 @@
+# frozen_string_literal: true
+
+module Types
+ module Ci
+ module VariableInterface
+ include Types::BaseInterface
+
+ graphql_name 'CiVariable'
+
+ field :id, GraphQL::Types::ID,
+ null: false,
+ description: 'ID of the variable.'
+
+ field :key, GraphQL::Types::String,
+ null: true,
+ description: 'Name of the variable.'
+
+ field :value, GraphQL::Types::String,
+ null: true,
+ description: 'Value of the variable.'
+
+ field :variable_type, ::Types::Ci::VariableTypeEnum,
+ null: true,
+ description: 'Type of the variable.'
+
+ field :raw, GraphQL::Types::Boolean,
+ null: true,
+ description: 'Indicates whether the variable is raw.'
+ end
+ end
+end
diff --git a/app/graphql/types/ci/variable_type.rb b/app/graphql/types/ci/variable_type.rb
deleted file mode 100644
index 63f89b6d207..00000000000
--- a/app/graphql/types/ci/variable_type.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: true
-
-module Types
- module Ci
- # rubocop: disable Graphql/AuthorizeTypes
- class VariableType < BaseObject
- graphql_name 'CiVariable'
-
- field :id, GraphQL::Types::ID, null: false,
- description: 'ID of the variable.'
-
- field :key, GraphQL::Types::String, null: true,
- description: 'Name of the variable.'
-
- field :value, GraphQL::Types::String, null: true,
- description: 'Value of the variable.'
-
- field :variable_type, ::Types::Ci::VariableTypeEnum, null: true,
- description: 'Type of the variable.'
-
- field :protected, GraphQL::Types::Boolean, null: true,
- description: 'Indicates whether the variable is protected.'
-
- field :masked, GraphQL::Types::Boolean, null: true,
- description: 'Indicates whether the variable is masked.'
-
- field :raw, GraphQL::Types::Boolean, null: true,
- description: 'Indicates whether the variable is raw.'
-
- field :environment_scope, GraphQL::Types::String, null: true,
- description: 'Scope defining the environments in which the variable can be used.'
-
- def environment_scope
- if object.respond_to?(:environment_scope)
- object.environment_scope
- end
- end
- end
- end
-end