diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-04-19 11:47:26 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-04-19 11:47:26 +0300 |
commit | 604cfb17a79b203dca7a2c56e84b58f8e819effd (patch) | |
tree | 10a8b509aa26bef62104dd741cad24fceb773c7a /lib | |
parent | d8d57f23b26df6c0d07fc7911edee16a70a775f0 (diff) | |
parent | 52c19d4da7830c9c39d23190822d3c2de80d13a4 (diff) |
Merge branch 'protected-runner-registration' into 'master'
Add configuration of access_level for runners on registration via API
See merge request gitlab-org/gitlab-ce!27490
Diffstat (limited to 'lib')
-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 = |