diff options
author | zelin-l <16577660+zelin-l@users.noreply.github.com> | 2019-04-18 09:06:53 -0400 |
---|---|---|
committer | zelin-l <16577660+zelin-l@users.noreply.github.com> | 2019-04-18 09:57:12 -0400 |
commit | 52c19d4da7830c9c39d23190822d3c2de80d13a4 (patch) | |
tree | 17300e81a46eb58a072855388702fe908be176b7 /lib/api/runner.rb | |
parent | 7a4b4cffba0313ada14b012dae05f31ecb17154d (diff) | |
download | gitlab-ce-52c19d4da7830c9c39d23190822d3c2de80d13a4.tar.gz |
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/api/runner.rb')
-rw-r--r-- | lib/api/runner.rb | 4 |
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 = |