BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
13b9b5f1
Commit
13b9b5f1
authored
Aug 29, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve API arguments as String
parent
1024718e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
runners.md
doc/api/runners.md
+3
-3
runners.rb
lib/api/runners.rb
+2
-1
runners_spec.rb
spec/requests/api/runners_spec.rb
+1
-1
No files found.
doc/api/runners.md
View file @
13b9b5f1
...
...
@@ -139,7 +139,7 @@ Example response:
"mysql"
],
"version"
:
null
,
"access_level"
:
0
"access_level"
:
"ref_protected"
}
```
...
...
@@ -159,7 +159,7 @@ PUT /runners/:id
|
`tag_list`
| array | no | The list of tags for a runner; put array of tags, that should be finally assigned to a runner |
|
`run_untagged`
| boolean | no | Flag indicating the runner can execute untagged jobs |
|
`locked`
| boolean | no | Flag indicating the runner is locked |
|
`access_level`
| integer | no | The access_level of the runner;
`not_protected`
: 0,
`ref_protected`
: 1
|
|
`access_level`
| integer | no | The access_level of the runner;
`not_protected`
or
`ref_protected`
|
```
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/runners/6" --form "description=test-1-20150125-test" --form "tag_list=ruby,mysql,tag1,tag2"
...
...
@@ -195,7 +195,7 @@ Example response:
"tag2"
],
"version"
:
null
,
"access_level"
:
0
"access_level"
:
"ref_protected"
}
```
...
...
lib/api/runners.rb
View file @
13b9b5f1
...
...
@@ -55,7 +55,8 @@ module API
optional
:tag_list
,
type:
Array
[
String
],
desc:
'The list of tags for a runner'
optional
:run_untagged
,
type:
Boolean
,
desc:
'Flag indicating the runner can execute untagged jobs'
optional
:locked
,
type:
Boolean
,
desc:
'Flag indicating the runner is locked'
optional
:access_level
,
type:
Integer
,
desc:
'The access_level of the runner'
optional
:access_level
,
type:
String
,
values:
Ci
::
Runner
.
access_levels
.
keys
,
desc:
'The access_level of the runner'
at_least_one_of
:description
,
:active
,
:tag_list
,
:run_untagged
,
:locked
,
:access_level
end
put
':id'
do
...
...
spec/requests/api/runners_spec.rb
View file @
13b9b5f1
...
...
@@ -192,7 +192,7 @@ describe API::Runners do
tag_list:
[
'ruby2.1'
,
'pgsql'
,
'mysql'
],
run_untagged:
'false'
,
locked:
'true'
,
access_level:
Ci
::
Runner
.
access_levels
[
'ref_protected'
]
)
access_level:
'ref_protected'
)
shared_runner
.
reload
expect
(
response
).
to
have_http_status
(
200
)
...
...
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