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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
cef8d1d4
Commit
cef8d1d4
authored
May 21, 2019
by
Fabio Pitino
Committed by
James Lopez
May 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add allow_failure attribute to Job API
Closes
https://gitlab.com/gitlab-org/gitlab-ce/issues/50813
parent
ea7b10cd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
1 deletion
+18
-1
changelogs/unreleased/add-allow_failure-to-job-api.yml
changelogs/unreleased/add-allow_failure-to-job-api.yml
+5
-0
doc/api/jobs.md
doc/api/jobs.md
+10
-0
lib/api/entities.rb
lib/api/entities.rb
+1
-1
spec/fixtures/api/schemas/public_api/v4/job.json
spec/fixtures/api/schemas/public_api/v4/job.json
+1
-0
spec/requests/api/jobs_spec.rb
spec/requests/api/jobs_spec.rb
+1
-0
No files found.
changelogs/unreleased/add-allow_failure-to-job-api.yml
0 → 100644
View file @
cef8d1d4
---
title
:
Add allow_failure attribute to Job API
merge_request
:
28406
author
:
type
:
added
doc/api/jobs.md
View file @
cef8d1d4
...
@@ -32,6 +32,7 @@ Example of response
...
@@ -32,6 +32,7 @@ Example of response
"title"
:
"Test the CI integration."
"title"
:
"Test the CI integration."
},
},
"coverage"
:
null
,
"coverage"
:
null
,
"allow_failure"
:
false
,
"created_at"
:
"2015-12-24T15:51:21.727Z"
,
"created_at"
:
"2015-12-24T15:51:21.727Z"
,
"started_at"
:
"2015-12-24T17:54:24.729Z"
,
"started_at"
:
"2015-12-24T17:54:24.729Z"
,
"finished_at"
:
"2015-12-24T17:54:24.921Z"
,
"finished_at"
:
"2015-12-24T17:54:24.921Z"
,
...
@@ -81,6 +82,7 @@ Example of response
...
@@ -81,6 +82,7 @@ Example of response
"title"
:
"Test the CI integration."
"title"
:
"Test the CI integration."
},
},
"coverage"
:
null
,
"coverage"
:
null
,
"allow_failure"
:
false
,
"created_at"
:
"2015-12-24T15:51:21.802Z"
,
"created_at"
:
"2015-12-24T15:51:21.802Z"
,
"started_at"
:
"2015-12-24T17:54:27.722Z"
,
"started_at"
:
"2015-12-24T17:54:27.722Z"
,
"finished_at"
:
"2015-12-24T17:54:27.895Z"
,
"finished_at"
:
"2015-12-24T17:54:27.895Z"
,
...
@@ -165,6 +167,7 @@ Example of response
...
@@ -165,6 +167,7 @@ Example of response
"title"
:
"Test the CI integration."
"title"
:
"Test the CI integration."
},
},
"coverage"
:
null
,
"coverage"
:
null
,
"allow_failure"
:
false
,
"created_at"
:
"2015-12-24T15:51:21.727Z"
,
"created_at"
:
"2015-12-24T15:51:21.727Z"
,
"started_at"
:
"2015-12-24T17:54:24.729Z"
,
"started_at"
:
"2015-12-24T17:54:24.729Z"
,
"finished_at"
:
"2015-12-24T17:54:24.921Z"
,
"finished_at"
:
"2015-12-24T17:54:24.921Z"
,
...
@@ -214,6 +217,7 @@ Example of response
...
@@ -214,6 +217,7 @@ Example of response
"title"
:
"Test the CI integration."
"title"
:
"Test the CI integration."
},
},
"coverage"
:
null
,
"coverage"
:
null
,
"allow_failure"
:
false
,
"created_at"
:
"2015-12-24T15:51:21.802Z"
,
"created_at"
:
"2015-12-24T15:51:21.802Z"
,
"started_at"
:
"2015-12-24T17:54:27.722Z"
,
"started_at"
:
"2015-12-24T17:54:27.722Z"
,
"finished_at"
:
"2015-12-24T17:54:27.895Z"
,
"finished_at"
:
"2015-12-24T17:54:27.895Z"
,
...
@@ -296,6 +300,7 @@ Example of response
...
@@ -296,6 +300,7 @@ Example of response
"title"
:
"Test the CI integration."
"title"
:
"Test the CI integration."
},
},
"coverage"
:
null
,
"coverage"
:
null
,
"allow_failure"
:
false
,
"created_at"
:
"2015-12-24T15:51:21.880Z"
,
"created_at"
:
"2015-12-24T15:51:21.880Z"
,
"started_at"
:
"2015-12-24T17:54:30.733Z"
,
"started_at"
:
"2015-12-24T17:54:30.733Z"
,
"finished_at"
:
"2015-12-24T17:54:31.198Z"
,
"finished_at"
:
"2015-12-24T17:54:31.198Z"
,
...
@@ -528,6 +533,7 @@ Example of response
...
@@ -528,6 +533,7 @@ Example of response
"title"
:
"Test the CI integration."
"title"
:
"Test the CI integration."
},
},
"coverage"
:
null
,
"coverage"
:
null
,
"allow_failure"
:
false
,
"created_at"
:
"2016-01-11T10:13:33.506Z"
,
"created_at"
:
"2016-01-11T10:13:33.506Z"
,
"started_at"
:
"2016-01-11T10:14:09.526Z"
,
"started_at"
:
"2016-01-11T10:14:09.526Z"
,
"finished_at"
:
null
,
"finished_at"
:
null
,
...
@@ -576,6 +582,7 @@ Example of response
...
@@ -576,6 +582,7 @@ Example of response
"title"
:
"Test the CI integration."
"title"
:
"Test the CI integration."
},
},
"coverage"
:
null
,
"coverage"
:
null
,
"allow_failure"
:
false
,
"created_at"
:
"2016-01-11T10:13:33.506Z"
,
"created_at"
:
"2016-01-11T10:13:33.506Z"
,
"started_at"
:
null
,
"started_at"
:
null
,
"finished_at"
:
null
,
"finished_at"
:
null
,
...
@@ -628,6 +635,7 @@ Example of response
...
@@ -628,6 +635,7 @@ Example of response
"title"
:
"Test the CI integration."
"title"
:
"Test the CI integration."
},
},
"coverage"
:
null
,
"coverage"
:
null
,
"allow_failure"
:
false
,
"download_url"
:
null
,
"download_url"
:
null
,
"id"
:
42
,
"id"
:
42
,
"name"
:
"rubocop"
,
"name"
:
"rubocop"
,
...
@@ -681,6 +689,7 @@ Example response:
...
@@ -681,6 +689,7 @@ Example response:
"title"
:
"Test the CI integration."
"title"
:
"Test the CI integration."
},
},
"coverage"
:
null
,
"coverage"
:
null
,
"allow_failure"
:
false
,
"download_url"
:
null
,
"download_url"
:
null
,
"id"
:
42
,
"id"
:
42
,
"name"
:
"rubocop"
,
"name"
:
"rubocop"
,
...
@@ -757,6 +766,7 @@ Example of response
...
@@ -757,6 +766,7 @@ Example of response
"title"
:
"Test the CI integration."
"title"
:
"Test the CI integration."
},
},
"coverage"
:
null
,
"coverage"
:
null
,
"allow_failure"
:
false
,
"created_at"
:
"2016-01-11T10:13:33.506Z"
,
"created_at"
:
"2016-01-11T10:13:33.506Z"
,
"started_at"
:
null
,
"started_at"
:
null
,
"finished_at"
:
null
,
"finished_at"
:
null
,
...
...
lib/api/entities.rb
View file @
cef8d1d4
...
@@ -1266,7 +1266,7 @@ module API
...
@@ -1266,7 +1266,7 @@ module API
end
end
class
JobBasic
<
Grape
::
Entity
class
JobBasic
<
Grape
::
Entity
expose
:id
,
:status
,
:stage
,
:name
,
:ref
,
:tag
,
:coverage
expose
:id
,
:status
,
:stage
,
:name
,
:ref
,
:tag
,
:coverage
,
:allow_failure
expose
:created_at
,
:started_at
,
:finished_at
expose
:created_at
,
:started_at
,
:finished_at
expose
:duration
expose
:duration
expose
:user
,
with:
User
expose
:user
,
with:
User
...
...
spec/fixtures/api/schemas/public_api/v4/job.json
View file @
cef8d1d4
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
"ref"
:
{
"type"
:
"string"
},
"ref"
:
{
"type"
:
"string"
},
"tag"
:
{
"type"
:
"boolean"
},
"tag"
:
{
"type"
:
"boolean"
},
"coverage"
:
{
"type"
:
[
"number"
,
"null"
]
},
"coverage"
:
{
"type"
:
[
"number"
,
"null"
]
},
"allow_failure"
:
{
"type"
:
"boolean"
},
"created_at"
:
{
"type"
:
"string"
},
"created_at"
:
{
"type"
:
"string"
},
"started_at"
:
{
"type"
:
[
"null"
,
"string"
]
},
"started_at"
:
{
"type"
:
[
"null"
,
"string"
]
},
"finished_at"
:
{
"type"
:
[
"null"
,
"string"
]
},
"finished_at"
:
{
"type"
:
[
"null"
,
"string"
]
},
...
...
spec/requests/api/jobs_spec.rb
View file @
cef8d1d4
...
@@ -286,6 +286,7 @@ describe API::Jobs do
...
@@ -286,6 +286,7 @@ describe API::Jobs do
expect
(
json_response
[
'ref'
]).
to
eq
(
job
.
ref
)
expect
(
json_response
[
'ref'
]).
to
eq
(
job
.
ref
)
expect
(
json_response
[
'tag'
]).
to
eq
(
job
.
tag
)
expect
(
json_response
[
'tag'
]).
to
eq
(
job
.
tag
)
expect
(
json_response
[
'coverage'
]).
to
eq
(
job
.
coverage
)
expect
(
json_response
[
'coverage'
]).
to
eq
(
job
.
coverage
)
expect
(
json_response
[
'allow_failure'
]).
to
eq
(
job
.
allow_failure
)
expect
(
Time
.
parse
(
json_response
[
'created_at'
])).
to
be_like_time
(
job
.
created_at
)
expect
(
Time
.
parse
(
json_response
[
'created_at'
])).
to
be_like_time
(
job
.
created_at
)
expect
(
Time
.
parse
(
json_response
[
'started_at'
])).
to
be_like_time
(
job
.
started_at
)
expect
(
Time
.
parse
(
json_response
[
'started_at'
])).
to
be_like_time
(
job
.
started_at
)
expect
(
Time
.
parse
(
json_response
[
'finished_at'
])).
to
be_like_time
(
job
.
finished_at
)
expect
(
Time
.
parse
(
json_response
[
'finished_at'
])).
to
be_like_time
(
job
.
finished_at
)
...
...
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