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
a5953474
Commit
a5953474
authored
Aug 19, 2020
by
lauraMon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds docs and schema
* Also refactors a spec * Adds a changelog
parent
e17ac92c
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
493 additions
and
7 deletions
+493
-7
changelogs/unreleased/lm-be-pipeline-mutations.yml
changelogs/unreleased/lm-be-pipeline-mutations.yml
+5
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+98
-0
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+359
-0
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+29
-0
spec/requests/api/graphql/mutations/ci/pipeline_destroy_spec.rb
...equests/api/graphql/mutations/ci/pipeline_destroy_spec.rb
+2
-7
No files found.
changelogs/unreleased/lm-be-pipeline-mutations.yml
0 → 100644
View file @
a5953474
---
title
:
'
GraphQL:
Pipeline
mutations
for
retry,
cancel,
and
destroy'
merge_request
:
39780
author
:
type
:
added
doc/api/graphql/reference/gitlab_schema.graphql
View file @
a5953474
...
...
@@ -9760,6 +9760,9 @@ type Mutation {
"""
mergeRequestUpdate
(
input
:
MergeRequestUpdateInput
!):
MergeRequestUpdatePayload
namespaceIncreaseStorageTemporarily
(
input
:
NamespaceIncreaseStorageTemporarilyInput
!):
NamespaceIncreaseStorageTemporarilyPayload
pipelineCancel
(
input
:
PipelineCancelInput
!):
PipelineCancelPayload
pipelineDestroy
(
input
:
PipelineDestroyInput
!):
PipelineDestroyPayload
pipelineRetry
(
input
:
PipelineRetryInput
!):
PipelineRetryPayload
removeAwardEmoji
(
input
:
RemoveAwardEmojiInput
!):
RemoveAwardEmojiPayload
@
deprecated
(
reason
:
"
Use
awardEmojiRemove
.
Deprecated
in
13.2"
)
removeProjectFromSecurityDashboard
(
input
:
RemoveProjectFromSecurityDashboardInput
!):
RemoveProjectFromSecurityDashboardPayload
runDastScan
(
input
:
RunDASTScanInput
!):
RunDASTScanPayload
...
...
@@ -10554,6 +10557,31 @@ type Pipeline {
userPermissions
:
PipelinePermissions
!
}
"""
Autogenerated input type of PipelineCancel
"""
input
PipelineCancelInput
{
"""
A
unique
identifier
for
the
client
performing
the
mutation
.
"""
clientMutationId
:
String
}
"""
Autogenerated return type of PipelineCancel
"""
type
PipelineCancelPayload
{
"""
A
unique
identifier
for
the
client
performing
the
mutation
.
"""
clientMutationId
:
String
"""
Errors
encountered
during
execution
of
the
mutation
.
"""
errors
:
[
String
!]!
}
enum
PipelineConfigSourceEnum
{
AUTO_DEVOPS_SOURCE
BRIDGE_SOURCE
...
...
@@ -10590,6 +10618,41 @@ type PipelineConnection {
pageInfo
:
PageInfo
!
}
"""
Autogenerated input type of PipelineDestroy
"""
input
PipelineDestroyInput
{
"""
A
unique
identifier
for
the
client
performing
the
mutation
.
"""
clientMutationId
:
String
"""
The
id
of
the
pipeline
to
mutate
"""
id
:
ID
!
}
"""
Autogenerated return type of PipelineDestroy
"""
type
PipelineDestroyPayload
{
"""
A
unique
identifier
for
the
client
performing
the
mutation
.
"""
clientMutationId
:
String
"""
Errors
encountered
during
execution
of
the
mutation
.
"""
errors
:
[
String
!]!
"""
The
pipeline
after
mutation
"""
pipeline
:
Pipeline
}
"""
An edge in a connection.
"""
...
...
@@ -10622,6 +10685,41 @@ type PipelinePermissions {
updatePipeline
:
Boolean
!
}
"""
Autogenerated input type of PipelineRetry
"""
input
PipelineRetryInput
{
"""
A
unique
identifier
for
the
client
performing
the
mutation
.
"""
clientMutationId
:
String
"""
The
id
of
the
pipeline
to
mutate
"""
id
:
ID
!
}
"""
Autogenerated return type of PipelineRetry
"""
type
PipelineRetryPayload
{
"""
A
unique
identifier
for
the
client
performing
the
mutation
.
"""
clientMutationId
:
String
"""
Errors
encountered
during
execution
of
the
mutation
.
"""
errors
:
[
String
!]!
"""
The
pipeline
after
mutation
"""
pipeline
:
Pipeline
}
enum
PipelineStatusEnum
{
CANCELED
CREATED
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
a5953474
This diff is collapsed.
Click to expand it.
doc/api/graphql/reference/index.md
View file @
a5953474
...
...
@@ -1622,6 +1622,25 @@ Information about pagination in a connection.
|
`user`
| User | Pipeline user |
|
`userPermissions`
| PipelinePermissions! | Permissions for the current user on the resource |
## PipelineCancelPayload
Autogenerated return type of PipelineCancel
| Name | Type | Description |
| --- | ---- | ---------- |
|
`clientMutationId`
| String | A unique identifier for the client performing the mutation. |
|
`errors`
| String! => Array | Errors encountered during execution of the mutation. |
## PipelineDestroyPayload
Autogenerated return type of PipelineDestroy
| Name | Type | Description |
| --- | ---- | ---------- |
|
`clientMutationId`
| String | A unique identifier for the client performing the mutation. |
|
`errors`
| String! => Array | Errors encountered during execution of the mutation. |
|
`pipeline`
| Pipeline | The pipeline after mutation |
## PipelinePermissions
| Name | Type | Description |
...
...
@@ -1630,6 +1649,16 @@ Information about pagination in a connection.
|
`destroyPipeline`
| Boolean! | Indicates the user can perform
`destroy_pipeline`
on this resource |
|
`updatePipeline`
| Boolean! | Indicates the user can perform
`update_pipeline`
on this resource |
## PipelineRetryPayload
Autogenerated return type of PipelineRetry
| Name | Type | Description |
| --- | ---- | ---------- |
|
`clientMutationId`
| String | A unique identifier for the client performing the mutation. |
|
`errors`
| String! => Array | Errors encountered during execution of the mutation. |
|
`pipeline`
| Pipeline | The pipeline after mutation |
## Project
| Name | Type | Description |
...
...
spec/requests/api/graphql/mutations/ci/pipeline_destroy_spec.rb
View file @
a5953474
...
...
@@ -5,8 +5,8 @@ require 'spec_helper'
RSpec
.
describe
'PipelineDestroy'
do
include
GraphqlHelpers
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
:success
,
project:
project
,
user:
user
)
}
let
(
:mutation
)
do
...
...
@@ -20,12 +20,6 @@ RSpec.describe 'PipelineDestroy' do
)
end
let
(
:mutation_response
)
{
graphql_mutation_response
(
:pipeline_destroy
)
}
before
do
project
.
add_maintainer
(
user
)
end
it
'returns an error if the user is not allowed to destroy the pipeline'
do
post_graphql_mutation
(
mutation
,
current_user:
create
(
:user
))
...
...
@@ -36,5 +30,6 @@ RSpec.describe 'PipelineDestroy' do
post_graphql_mutation
(
mutation
,
current_user:
user
)
expect
(
response
).
to
have_gitlab_http_status
(
:success
)
expect
{
pipeline
.
reload
}.
to
raise_error
(
ActiveRecord
::
RecordNotFound
)
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