Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7df453b4
Commit
7df453b4
authored
Jun 14, 2021
by
Pedro Pombeiro
Committed by
Dmytro Zaporozhets (DZ)
Jun 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add minutes cost factor to Runner GraphQL type
parent
c61122f9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
2 deletions
+39
-2
app/graphql/types/ci/runner_type.rb
app/graphql/types/ci/runner_type.rb
+2
-0
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+2
-0
ee/app/graphql/ee/types/ci/runner_type.rb
ee/app/graphql/ee/types/ci/runner_type.rb
+18
-0
ee/spec/graphql/types/ci/runner_type_spec.rb
ee/spec/graphql/types/ci/runner_type_spec.rb
+13
-0
spec/graphql/types/ci/runner_type_spec.rb
spec/graphql/types/ci/runner_type_spec.rb
+4
-2
No files found.
app/graphql/types/ci/runner_type.rb
View file @
7df453b4
...
...
@@ -40,3 +40,5 @@ module Types
end
end
end
Types
::
Ci
::
RunnerType
.
prepend_mod_with
(
'Types::Ci::RunnerType'
)
doc/api/graphql/reference/index.md
View file @
7df453b4
...
...
@@ -7544,6 +7544,8 @@ Represents the total number of issues and their weights for a particular day.
|
<a
id=
"cirunneripaddress"
></a>
`ipAddress`
|
[
`String!`
](
#string
)
| IP address of the runner. |
|
<a
id=
"cirunnerlocked"
></a>
`locked`
|
[
`Boolean`
](
#boolean
)
| Indicates the runner is locked. |
|
<a
id=
"cirunnermaximumtimeout"
></a>
`maximumTimeout`
|
[
`Int`
](
#int
)
| Maximum timeout (in seconds) for jobs processed by the runner. |
|
<a
id=
"cirunnerprivateprojectsminutescostfactor"
></a>
`privateProjectsMinutesCostFactor`
|
[
`Float`
](
#float
)
| Private projects' "minutes cost factor" associated with the runner (GitLab.com only). |
|
<a
id=
"cirunnerpublicprojectsminutescostfactor"
></a>
`publicProjectsMinutesCostFactor`
|
[
`Float`
](
#float
)
| Public projects' "minutes cost factor" associated with the runner (GitLab.com only). |
|
<a
id=
"cirunnerrevision"
></a>
`revision`
|
[
`String!`
](
#string
)
| Revision of the runner. |
|
<a
id=
"cirunnerrununtagged"
></a>
`runUntagged`
|
[
`Boolean!`
](
#boolean
)
| Indicates the runner is able to run untagged jobs. |
|
<a
id=
"cirunnerrunnertype"
></a>
`runnerType`
|
[
`CiRunnerType!`
](
#cirunnertype
)
| Type of the runner. |
...
...
ee/app/graphql/ee/types/ci/runner_type.rb
0 → 100644
View file @
7df453b4
# frozen_string_literal: true
module
EE
module
Types
module
Ci
module
RunnerType
extend
ActiveSupport
::
Concern
prepended
do
field
:public_projects_minutes_cost_factor
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
description:
'Public projects\' "minutes cost factor" associated with the runner (GitLab.com only).'
field
:private_projects_minutes_cost_factor
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
description:
'Private projects\' "minutes cost factor" associated with the runner (GitLab.com only).'
end
end
end
end
end
ee/spec/graphql/types/ci/runner_type_spec.rb
0 → 100644
View file @
7df453b4
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
GitlabSchema
.
types
[
'CiRunner'
]
do
it
{
expect
(
described_class
.
graphql_name
).
to
eq
(
'CiRunner'
)
}
it
'includes the ee specific fields'
do
expected_fields
=
%w[public_projects_minutes_cost_factor private_projects_minutes_cost_factor]
expect
(
described_class
).
to
include_graphql_fields
(
*
expected_fields
)
end
end
spec/graphql/types/ci/runner_type_spec.rb
View file @
7df453b4
...
...
@@ -2,15 +2,17 @@
require
'spec_helper'
RSpec
.
describe
Types
::
Ci
::
RunnerType
do
RSpec
.
describe
GitlabSchema
.
types
[
'CiRunner'
]
do
specify
{
expect
(
described_class
.
graphql_name
).
to
eq
(
'CiRunner'
)
}
specify
{
expect
(
described_class
).
to
require_graphql_authorizations
(
:read_runner
)
}
it
'contains attributes related to a runner'
do
expected_fields
=
%w[
id description contacted_at maximum_timeout access_level active status
version short_sha revision locked run_untagged ip_address runner_type tag_list
]
expect
(
described_class
).
to
hav
e_graphql_fields
(
*
expected_fields
)
expect
(
described_class
).
to
includ
e_graphql_fields
(
*
expected_fields
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment