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
a7f53bdd
Commit
a7f53bdd
authored
Dec 14, 2021
by
Marcel Amirault
Committed by
Marius Bobin
Dec 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose iid in pipelines api
Changelog: added
parent
c3e01ac3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
2 deletions
+12
-2
doc/api/pipelines.md
doc/api/pipelines.md
+8
-0
lib/api/entities/ci/pipeline_basic.rb
lib/api/entities/ci/pipeline_basic.rb
+1
-1
spec/fixtures/api/schemas/pipeline_schedule.json
spec/fixtures/api/schemas/pipeline_schedule.json
+1
-0
spec/requests/api/ci/pipelines_spec.rb
spec/requests/api/ci/pipelines_spec.rb
+2
-1
No files found.
doc/api/pipelines.md
View file @
a7f53bdd
...
...
@@ -15,6 +15,8 @@ Read more on [pagination](index.md#pagination).
## List project pipelines
> `iid` in response [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/342223) in GitLab 14.6.
List pipelines in a project. Child pipelines are not included in the results,
but you can
[
get child pipeline
](
pipelines.md#get-a-single-pipeline
)
individually.
...
...
@@ -74,6 +76,8 @@ Example of response
## Get a single pipeline
> `iid` in response [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/342223) in GitLab 14.6.
Get one pipeline from a project.
You can also get a single
[
child pipeline
](
../ci/pipelines/parent_child_pipelines.md
)
.
...
...
@@ -267,6 +271,8 @@ Sample response:
## Create a new pipeline
> `iid` in response [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/342223) in GitLab 14.6.
```
plaintext
POST /projects/:id/pipeline
```
...
...
@@ -316,6 +322,8 @@ Example of response
## Retry jobs in a pipeline
> `iid` in response [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/342223) in GitLab 14.6.
```
plaintext
POST /projects/:id/pipelines/:pipeline_id/retry
```
...
...
lib/api/entities/ci/pipeline_basic.rb
View file @
a7f53bdd
...
...
@@ -4,7 +4,7 @@ module API
module
Entities
module
Ci
class
PipelineBasic
<
Grape
::
Entity
expose
:id
,
:project_id
,
:sha
,
:ref
,
:status
,
:source
expose
:id
,
:
iid
,
:
project_id
,
:sha
,
:ref
,
:status
,
:source
expose
:created_at
,
:updated_at
expose
:web_url
do
|
pipeline
,
_options
|
...
...
spec/fixtures/api/schemas/pipeline_schedule.json
View file @
a7f53bdd
...
...
@@ -14,6 +14,7 @@
"type"
:
[
"object"
,
"null"
],
"properties"
:
{
"id"
:
{
"type"
:
"integer"
},
"iid"
:
{
"type"
:
"integer"
},
"project_id"
:
{
"type"
:
"integer"
},
"sha"
:
{
"type"
:
"string"
},
"ref"
:
{
"type"
:
"string"
},
...
...
spec/requests/api/ci/pipelines_spec.rb
View file @
a7f53bdd
...
...
@@ -33,6 +33,7 @@ RSpec.describe API::Ci::Pipelines do
expect
(
json_response
).
to
be_an
Array
expect
(
json_response
.
first
[
'sha'
]).
to
match
(
/\A\h{40}\z/
)
expect
(
json_response
.
first
[
'id'
]).
to
eq
pipeline
.
id
expect
(
json_response
.
first
[
'iid'
]).
to
eq
pipeline
.
iid
expect
(
json_response
.
first
[
'web_url'
]).
to
be_present
end
...
...
@@ -40,7 +41,7 @@ RSpec.describe API::Ci::Pipelines do
it
'includes pipeline source'
do
get
api
(
"/projects/
#{
project
.
id
}
/pipelines"
,
user
)
expect
(
json_response
.
first
.
keys
).
to
contain_exactly
(
*
%w[id project_id sha ref status web_url created_at updated_at source]
)
expect
(
json_response
.
first
.
keys
).
to
contain_exactly
(
*
%w[id
iid
project_id sha ref status web_url created_at updated_at source]
)
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