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
7c6ac701
Commit
7c6ac701
authored
Aug 13, 2021
by
Cheryl Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update feature_category for different Runner endpoints
parent
d5ae78b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
lib/api/ci/runner.rb
lib/api/ci/runner.rb
+9
-11
No files found.
lib/api/ci/runner.rb
View file @
7c6ac701
...
@@ -7,8 +7,6 @@ module API
...
@@ -7,8 +7,6 @@ module API
content_type
:txt
,
'text/plain'
content_type
:txt
,
'text/plain'
feature_category
:runner
resource
:runners
do
resource
:runners
do
desc
'Registers a new Runner'
do
desc
'Registers a new Runner'
do
success
Entities
::
Ci
::
RunnerRegistrationDetails
success
Entities
::
Ci
::
RunnerRegistrationDetails
...
@@ -26,7 +24,7 @@ module API
...
@@ -26,7 +24,7 @@ module API
optional
:tag_list
,
type:
Array
[
String
],
coerce_with:
::
API
::
Validations
::
Types
::
CommaSeparatedToArray
.
coerce
,
desc:
%q(List of Runner's tags)
optional
:tag_list
,
type:
Array
[
String
],
coerce_with:
::
API
::
Validations
::
Types
::
CommaSeparatedToArray
.
coerce
,
desc:
%q(List of Runner's tags)
optional
:maximum_timeout
,
type:
Integer
,
desc:
'Maximum timeout set when this Runner will handle the job'
optional
:maximum_timeout
,
type:
Integer
,
desc:
'Maximum timeout set when this Runner will handle the job'
end
end
post
'/'
do
post
'/'
,
feature_category: :runner
do
attributes
=
attributes_for_keys
([
:description
,
:active
,
:locked
,
:run_untagged
,
:tag_list
,
:access_level
,
:maximum_timeout
])
attributes
=
attributes_for_keys
([
:description
,
:active
,
:locked
,
:run_untagged
,
:tag_list
,
:access_level
,
:maximum_timeout
])
.
merge
(
get_runner_details_from_request
)
.
merge
(
get_runner_details_from_request
)
...
@@ -59,7 +57,7 @@ module API
...
@@ -59,7 +57,7 @@ module API
params
do
params
do
requires
:token
,
type:
String
,
desc:
%q(Runner's authentication token)
requires
:token
,
type:
String
,
desc:
%q(Runner's authentication token)
end
end
delete
'/'
do
delete
'/'
,
feature_category: :runner
do
authenticate_runner!
authenticate_runner!
destroy_conditionally!
(
current_runner
)
destroy_conditionally!
(
current_runner
)
...
@@ -71,7 +69,7 @@ module API
...
@@ -71,7 +69,7 @@ module API
params
do
params
do
requires
:token
,
type:
String
,
desc:
%q(Runner's authentication token)
requires
:token
,
type:
String
,
desc:
%q(Runner's authentication token)
end
end
post
'/verify'
do
post
'/verify'
,
feature_category: :runner
do
authenticate_runner!
authenticate_runner!
status
200
status
200
body
"200"
body
"200"
...
@@ -123,7 +121,7 @@ module API
...
@@ -123,7 +121,7 @@ module API
formatter
:build_json
,
->
(
object
,
_
)
{
object
}
formatter
:build_json
,
->
(
object
,
_
)
{
object
}
parser
:build_json
,
::
Grape
::
Parser
::
Json
parser
:build_json
,
::
Grape
::
Parser
::
Json
post
'/request'
do
post
'/request'
,
feature_category: :continuous_integration
do
authenticate_runner!
authenticate_runner!
unless
current_runner
.
active?
unless
current_runner
.
active?
...
@@ -177,7 +175,7 @@ module API
...
@@ -177,7 +175,7 @@ module API
end
end
optional
:exit_code
,
type:
Integer
,
desc:
%q(Job's exit code)
optional
:exit_code
,
type:
Integer
,
desc:
%q(Job's exit code)
end
end
put
'/:id'
do
put
'/:id'
,
feature_category: :continuous_integration
do
job
=
authenticate_job!
job
=
authenticate_job!
Gitlab
::
Metrics
.
add_event
(
:update_build
)
Gitlab
::
Metrics
.
add_event
(
:update_build
)
...
@@ -204,7 +202,7 @@ module API
...
@@ -204,7 +202,7 @@ module API
requires
:id
,
type:
Integer
,
desc:
%q(Job's ID)
requires
:id
,
type:
Integer
,
desc:
%q(Job's ID)
optional
:token
,
type:
String
,
desc:
%q(Job's authentication token)
optional
:token
,
type:
String
,
desc:
%q(Job's authentication token)
end
end
patch
'/:id/trace'
do
patch
'/:id/trace'
,
feature_category: :continuous_integration
do
job
=
authenticate_job!
job
=
authenticate_job!
error!
(
'400 Missing header Content-Range'
,
400
)
unless
request
.
headers
.
key?
(
'Content-Range'
)
error!
(
'400 Missing header Content-Range'
,
400
)
unless
request
.
headers
.
key?
(
'Content-Range'
)
...
@@ -249,7 +247,7 @@ module API
...
@@ -249,7 +247,7 @@ module API
optional
:artifact_type
,
type:
String
,
desc:
%q(The type of artifact)
,
optional
:artifact_type
,
type:
String
,
desc:
%q(The type of artifact)
,
default:
'archive'
,
values:
::
Ci
::
JobArtifact
.
file_types
.
keys
default:
'archive'
,
values:
::
Ci
::
JobArtifact
.
file_types
.
keys
end
end
post
'/:id/artifacts/authorize'
do
post
'/:id/artifacts/authorize'
,
feature_category: :build_artifacts
do
not_allowed!
unless
Gitlab
.
config
.
artifacts
.
enabled
not_allowed!
unless
Gitlab
.
config
.
artifacts
.
enabled
require_gitlab_workhorse!
require_gitlab_workhorse!
...
@@ -285,7 +283,7 @@ module API
...
@@ -285,7 +283,7 @@ module API
default:
'zip'
,
values:
::
Ci
::
JobArtifact
.
file_formats
.
keys
default:
'zip'
,
values:
::
Ci
::
JobArtifact
.
file_formats
.
keys
optional
:metadata
,
type:
::
API
::
Validations
::
Types
::
WorkhorseFile
,
desc:
%(The artifact metadata to store (generated by Multipart middleware))
optional
:metadata
,
type:
::
API
::
Validations
::
Types
::
WorkhorseFile
,
desc:
%(The artifact metadata to store (generated by Multipart middleware))
end
end
post
'/:id/artifacts'
do
post
'/:id/artifacts'
,
feature_category: :build_artifacts
do
not_allowed!
unless
Gitlab
.
config
.
artifacts
.
enabled
not_allowed!
unless
Gitlab
.
config
.
artifacts
.
enabled
require_gitlab_workhorse!
require_gitlab_workhorse!
...
@@ -314,7 +312,7 @@ module API
...
@@ -314,7 +312,7 @@ module API
optional
:token
,
type:
String
,
desc:
%q(Job's authentication token)
optional
:token
,
type:
String
,
desc:
%q(Job's authentication token)
optional
:direct_download
,
default:
false
,
type:
Boolean
,
desc:
%q(Perform direct download from remote storage instead of proxying artifacts)
optional
:direct_download
,
default:
false
,
type:
Boolean
,
desc:
%q(Perform direct download from remote storage instead of proxying artifacts)
end
end
get
'/:id/artifacts'
do
get
'/:id/artifacts'
,
feature_category: :build_artifacts
do
job
=
authenticate_job!
(
require_running:
false
)
job
=
authenticate_job!
(
require_running:
false
)
present_carrierwave_file!
(
job
.
artifacts_file
,
supports_direct_download:
params
[
:direct_download
])
present_carrierwave_file!
(
job
.
artifacts_file
,
supports_direct_download:
params
[
:direct_download
])
...
...
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