summaryrefslogtreecommitdiff
path: root/app/graphql/types/ci/config
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/ci/config')
-rw-r--r--app/graphql/types/ci/config/group_type.rb4
-rw-r--r--app/graphql/types/ci/config/job_type.rb30
-rw-r--r--app/graphql/types/ci/config/stage_type.rb4
3 files changed, 19 insertions, 19 deletions
diff --git a/app/graphql/types/ci/config/group_type.rb b/app/graphql/types/ci/config/group_type.rb
index e5cb0d4e72f..19076fe9c20 100644
--- a/app/graphql/types/ci/config/group_type.rb
+++ b/app/graphql/types/ci/config/group_type.rb
@@ -7,10 +7,10 @@ module Types
class GroupType < BaseObject
graphql_name 'CiConfigGroup'
- field :name, GraphQL::Types::String, null: true,
- description: 'Name of the job group.'
field :jobs, Types::Ci::Config::JobType.connection_type, null: true,
description: 'Jobs in group.'
+ field :name, GraphQL::Types::String, null: true,
+ description: 'Name of the job group.'
field :size, GraphQL::Types::Int, null: true,
description: 'Size of the job group.'
end
diff --git a/app/graphql/types/ci/config/job_type.rb b/app/graphql/types/ci/config/job_type.rb
index 4cf6780ef60..20279143635 100644
--- a/app/graphql/types/ci/config/job_type.rb
+++ b/app/graphql/types/ci/config/job_type.rb
@@ -7,33 +7,33 @@ module Types
class JobType < BaseObject
graphql_name 'CiConfigJob'
- field :name, GraphQL::Types::String, null: true,
- description: 'Name of the job.'
- field :group_name, GraphQL::Types::String, null: true,
- description: 'Name of the job group.'
- field :stage, GraphQL::Types::String, null: true,
- description: 'Name of the job stage.'
- field :needs, Types::Ci::Config::NeedType.connection_type, null: true,
- description: 'Builds that must complete before the jobs run.'
+ 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: 'Override a set of commands that are executed before the job.'
- field :script, [GraphQL::Types::String], null: true,
- description: 'Shell script that is executed by a runner.'
- field :after_script, [GraphQL::Types::String], null: true,
- description: 'Override a set of commands that are executed after the job.'
- field :when, GraphQL::Types::String, null: true,
- description: 'When to run the job.',
- resolver_method: :restrict_when_to_run_jobs
field :environment, GraphQL::Types::String, null: true,
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.'
+ field :group_name, GraphQL::Types::String, null: true,
+ 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: '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 :script, [GraphQL::Types::String], null: true,
+ description: 'Shell script that is executed by a runner.'
+ field :stage, GraphQL::Types::String, null: true,
+ description: 'Name of the job stage.'
field :tags, [GraphQL::Types::String], null: true,
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
def restrict_when_to_run_jobs
object[:when]
diff --git a/app/graphql/types/ci/config/stage_type.rb b/app/graphql/types/ci/config/stage_type.rb
index 7e2aa9470f2..5b1163edac2 100644
--- a/app/graphql/types/ci/config/stage_type.rb
+++ b/app/graphql/types/ci/config/stage_type.rb
@@ -7,10 +7,10 @@ module Types
class StageType < BaseObject
graphql_name 'CiConfigStage'
- field :name, GraphQL::Types::String, null: true,
- description: 'Name of the stage.'
field :groups, Types::Ci::Config::GroupType.connection_type, null: true,
description: 'Groups of jobs for the stage.'
+ field :name, GraphQL::Types::String, null: true,
+ description: 'Name of the stage.'
end
end
end