Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorzelin-l <16577660+zelin-l@users.noreply.github.com>2019-04-18 16:06:53 +0300
committerzelin-l <16577660+zelin-l@users.noreply.github.com>2019-04-18 16:57:12 +0300
commit52c19d4da7830c9c39d23190822d3c2de80d13a4 (patch)
tree17300e81a46eb58a072855388702fe908be176b7 /lib
parent7a4b4cffba0313ada14b012dae05f31ecb17154d (diff)
Add configuration of access_level for runners on registration via API
Allow setting access_level of new runner to not_protected (default) or ref_protected Minor update to relevant docs and tests
Diffstat (limited to 'lib')
-rw-r--r--lib/api/runner.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/runner.rb b/lib/api/runner.rb
index c60d25b88cb..ea36c24eca2 100644
--- a/lib/api/runner.rb
+++ b/lib/api/runner.rb
@@ -15,12 +15,14 @@ module API
optional :info, type: Hash, desc: %q(Runner's metadata)
optional :active, type: Boolean, desc: 'Should Runner be active'
optional :locked, type: Boolean, desc: 'Should Runner be locked for current project'
+ optional :access_level, type: String, values: Ci::Runner.access_levels.keys,
+ desc: 'The access_level of the runner'
optional :run_untagged, type: Boolean, desc: 'Should Runner handle untagged jobs'
optional :tag_list, type: Array[String], desc: %q(List of Runner's tags)
optional :maximum_timeout, type: Integer, desc: 'Maximum timeout set when this Runner will handle the job'
end
post '/' do
- attributes = attributes_for_keys([:description, :active, :locked, :run_untagged, :tag_list, :maximum_timeout])
+ attributes = attributes_for_keys([:description, :active, :locked, :run_untagged, :tag_list, :access_level, :maximum_timeout])
.merge(get_runner_details_from_request)
attributes =