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
90558f87
Commit
90558f87
authored
Dec 21, 2020
by
lauraMon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates existing specs
* Updates schema and docs * Adds a changelog
parent
2fcf71d0
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
948 additions
and
125 deletions
+948
-125
changelogs/unreleased/lm-update-w-connections-graphql.yml
changelogs/unreleased/lm-update-w-connections-graphql.yml
+5
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+224
-4
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+652
-80
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+4
-4
spec/requests/api/graphql/ci/config_spec.rb
spec/requests/api/graphql/ci/config_spec.rb
+63
-37
No files found.
changelogs/unreleased/lm-update-w-connections-graphql.yml
0 → 100644
View file @
90558f87
---
title
:
Update ci config type for GraphQL to use connection_type
merge_request
:
50160
author
:
type
:
changed
doc/api/graphql/reference/gitlab_schema.graphql
View file @
90558f87
...
...
@@ -2291,7 +2291,27 @@ type CiConfig {
"""
Stages
of
the
pipeline
"""
stages
:
[
CiConfigStage
!]
stages
(
"""
Returns
the
elements
in
the
list
that
come
after
the
specified
cursor
.
"""
after
:
String
"""
Returns
the
elements
in
the
list
that
come
before
the
specified
cursor
.
"""
before
:
String
"""
Returns
the
first
_n_
elements
from
the
list
.
"""
first
:
Int
"""
Returns
the
last
_n_
elements
from
the
list
.
"""
last
:
Int
):
CiConfigStageConnection
"""
Status
of
linting
,
can
be
either
valid
or
invalid
...
...
@@ -2303,7 +2323,27 @@ type CiConfigGroup {
"""
Jobs
in
group
"""
jobs
:
[
CiConfigJob
!]
jobs
(
"""
Returns
the
elements
in
the
list
that
come
after
the
specified
cursor
.
"""
after
:
String
"""
Returns
the
elements
in
the
list
that
come
before
the
specified
cursor
.
"""
before
:
String
"""
Returns
the
first
_n_
elements
from
the
list
.
"""
first
:
Int
"""
Returns
the
last
_n_
elements
from
the
list
.
"""
last
:
Int
):
CiConfigJobConnection
"""
Name
of
the
job
group
...
...
@@ -2316,6 +2356,41 @@ type CiConfigGroup {
size
:
Int
}
"""
The connection type for CiConfigGroup.
"""
type
CiConfigGroupConnection
{
"""
A
list
of
edges
.
"""
edges
:
[
CiConfigGroupEdge
]
"""
A
list
of
nodes
.
"""
nodes
:
[
CiConfigGroup
]
"""
Information
to
aid
in
pagination
.
"""
pageInfo
:
PageInfo
!
}
"""
An edge in a connection.
"""
type
CiConfigGroupEdge
{
"""
A
cursor
for
use
in
pagination
.
"""
cursor
:
String
!
"""
The
item
at
the
end
of
the
edge
.
"""
node
:
CiConfigGroup
}
type
CiConfigJob
{
"""
Name
of
the
job
group
...
...
@@ -2330,7 +2405,27 @@ type CiConfigJob {
"""
Builds
that
must
complete
before
the
jobs
run
"""
needs
:
[
CiConfigNeed
!]
needs
(
"""
Returns
the
elements
in
the
list
that
come
after
the
specified
cursor
.
"""
after
:
String
"""
Returns
the
elements
in
the
list
that
come
before
the
specified
cursor
.
"""
before
:
String
"""
Returns
the
first
_n_
elements
from
the
list
.
"""
first
:
Int
"""
Returns
the
last
_n_
elements
from
the
list
.
"""
last
:
Int
):
CiConfigNeedConnection
"""
Name
of
the
job
stage
...
...
@@ -2338,6 +2433,41 @@ type CiConfigJob {
stage
:
String
}
"""
The connection type for CiConfigJob.
"""
type
CiConfigJobConnection
{
"""
A
list
of
edges
.
"""
edges
:
[
CiConfigJobEdge
]
"""
A
list
of
nodes
.
"""
nodes
:
[
CiConfigJob
]
"""
Information
to
aid
in
pagination
.
"""
pageInfo
:
PageInfo
!
}
"""
An edge in a connection.
"""
type
CiConfigJobEdge
{
"""
A
cursor
for
use
in
pagination
.
"""
cursor
:
String
!
"""
The
item
at
the
end
of
the
edge
.
"""
node
:
CiConfigJob
}
type
CiConfigNeed
{
"""
Name
of
the
need
...
...
@@ -2345,11 +2475,66 @@ type CiConfigNeed {
name
:
String
}
"""
The connection type for CiConfigNeed.
"""
type
CiConfigNeedConnection
{
"""
A
list
of
edges
.
"""
edges
:
[
CiConfigNeedEdge
]
"""
A
list
of
nodes
.
"""
nodes
:
[
CiConfigNeed
]
"""
Information
to
aid
in
pagination
.
"""
pageInfo
:
PageInfo
!
}
"""
An edge in a connection.
"""
type
CiConfigNeedEdge
{
"""
A
cursor
for
use
in
pagination
.
"""
cursor
:
String
!
"""
The
item
at
the
end
of
the
edge
.
"""
node
:
CiConfigNeed
}
type
CiConfigStage
{
"""
Groups
of
jobs
for
the
stage
"""
groups
:
[
CiConfigGroup
!]
groups
(
"""
Returns
the
elements
in
the
list
that
come
after
the
specified
cursor
.
"""
after
:
String
"""
Returns
the
elements
in
the
list
that
come
before
the
specified
cursor
.
"""
before
:
String
"""
Returns
the
first
_n_
elements
from
the
list
.
"""
first
:
Int
"""
Returns
the
last
_n_
elements
from
the
list
.
"""
last
:
Int
):
CiConfigGroupConnection
"""
Name
of
the
stage
...
...
@@ -2357,6 +2542,41 @@ type CiConfigStage {
name
:
String
}
"""
The connection type for CiConfigStage.
"""
type
CiConfigStageConnection
{
"""
A
list
of
edges
.
"""
edges
:
[
CiConfigStageEdge
]
"""
A
list
of
nodes
.
"""
nodes
:
[
CiConfigStage
]
"""
Information
to
aid
in
pagination
.
"""
pageInfo
:
PageInfo
!
}
"""
An edge in a connection.
"""
type
CiConfigStageEdge
{
"""
A
cursor
for
use
in
pagination
.
"""
cursor
:
String
!
"""
The
item
at
the
end
of
the
edge
.
"""
node
:
CiConfigStage
}
"""
Values for YAML processor result
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
90558f87
This diff is collapsed.
Click to expand it.
doc/api/graphql/reference/index.md
View file @
90558f87
...
...
@@ -381,14 +381,14 @@ Represents the total number of issues and their weights for a particular day.
| ----- | ---- | ----------- |
|
`errors`
| String! => Array | Linting errors |
|
`mergedYaml`
| String | Merged CI config YAML |
|
`stages`
| CiConfigStage
! => Array
| Stages of the pipeline |
|
`stages`
| CiConfigStage
Connection
| Stages of the pipeline |
|
`status`
| CiConfigStatus | Status of linting, can be either valid or invalid |
### CiConfigGroup
| Field | Type | Description |
| ----- | ---- | ----------- |
|
`jobs`
| CiConfigJob
! => Array
| Jobs in group |
|
`jobs`
| CiConfigJob
Connection
| Jobs in group |
|
`name`
| String | Name of the job group |
|
`size`
| Int | Size of the job group |
...
...
@@ -398,7 +398,7 @@ Represents the total number of issues and their weights for a particular day.
| ----- | ---- | ----------- |
|
`groupName`
| String | Name of the job group |
|
`name`
| String | Name of the job |
|
`needs`
| CiConfigNeed
! => Array
| Builds that must complete before the jobs run |
|
`needs`
| CiConfigNeed
Connection
| Builds that must complete before the jobs run |
|
`stage`
| String | Name of the job stage |
### CiConfigNeed
...
...
@@ -411,7 +411,7 @@ Represents the total number of issues and their weights for a particular day.
| Field | Type | Description |
| ----- | ---- | ----------- |
|
`groups`
| CiConfigGroup
! => Array
| Groups of jobs for the stage |
|
`groups`
| CiConfigGroup
Connection
| Groups of jobs for the stage |
|
`name`
| String | Name of the stage |
### CiGroup
...
...
spec/requests/api/graphql/ci/config_spec.rb
View file @
90558f87
...
...
@@ -20,16 +20,24 @@ RSpec.describe 'Query.ciConfig' do
status
errors
stages {
name
groups {
nodes {
name
size
jobs {
name
groupName
stage
needs {
groups {
nodes {
name
size
jobs {
nodes {
name
groupName
stage
needs {
nodes {
name
}
}
}
}
}
}
}
...
...
@@ -50,42 +58,60 @@ RSpec.describe 'Query.ciConfig' do
"status"
=>
"VALID"
,
"errors"
=>
[],
"stages"
=>
[
{
"name"
=>
"build"
,
"groups"
=>
[
{
"nodes"
=>
[
{
"name"
=>
"build"
,
"groups"
=>
{
"name"
=>
"rspec"
,
"size"
=>
2
,
"jobs"
=>
"nodes"
=>
[
{
"name"
=>
"rspec 0 1"
,
"groupName"
=>
"rspec"
,
"stage"
=>
"build"
,
"needs"
=>
[]
},
{
"name"
=>
"rspec 0 2"
,
"groupName"
=>
"rspec"
,
"stage"
=>
"build"
,
"needs"
=>
[]
}
]
},
{
"name"
=>
"spinach"
,
"size"
=>
1
,
"jobs"
=>
[
{
"name"
=>
"spinach"
,
"groupName"
=>
"spinach"
,
"stage"
=>
"build"
,
"needs"
=>
[]
}
{
"name"
=>
"rspec"
,
"size"
=>
2
,
"jobs"
=>
{
"nodes"
=>
[
{
"name"
=>
"rspec 0 1"
,
"groupName"
=>
"rspec"
,
"stage"
=>
"build"
,
"needs"
=>
{
"nodes"
=>
[]
}
},
{
"name"
=>
"rspec 0 2"
,
"groupName"
=>
"rspec"
,
"stage"
=>
"build"
,
"needs"
=>
{
"nodes"
=>
[]
}
}
]
}
},
{
"name"
=>
"spinach"
,
"size"
=>
1
,
"jobs"
=>
{
"nodes"
=>
[
{
"name"
=>
"spinach"
,
"groupName"
=>
"spinach"
,
"stage"
=>
"build"
,
"needs"
=>
{
"nodes"
=>
[]
}
}
]
}
}
]
}
]
},
{
"name"
=>
"test"
,
"groups"
=>
[
},
{
"name"
=>
"test"
,
"groups"
=>
{
"name"
=>
"docker"
,
"size"
=>
1
,
"jobs"
=>
[
{
"name"
=>
"docker"
,
"groupName"
=>
"docker"
,
"stage"
=>
"test"
,
"needs"
=>
[{
"name"
=>
"spinach"
},
{
"name"
=>
"rspec 0 1"
}]
}
"nodes"
=>
[
{
"name"
=>
"docker"
,
"size"
=>
1
,
"jobs"
=>
{
"nodes"
=>
[
{
"name"
=>
"docker"
,
"groupName"
=>
"docker"
,
"stage"
=>
"test"
,
"needs"
=>
{
"nodes"
=>
[{
"name"
=>
"spinach"
},
{
"name"
=>
"rspec 0 1"
}]
}
}
]
}
}
]
}
]
}
]
}
]
}
)
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