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:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-05-06 15:06:57 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-05-19 23:01:53 +0300
commitb8cf2a340b3c56eb7e226473034ead2c4e5d609a (patch)
treebcdf764c36d47151a16f7833b29c02655ed5daa6 /lib
parent9ba72378fc006ecd353e1447a50d2231df09c851 (diff)
Set run untagged option when registering a runner
Diffstat (limited to 'lib')
-rw-r--r--lib/ci/api/runners.rb15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/ci/api/runners.rb b/lib/ci/api/runners.rb
index 192b1d18a51..ea35d0f6dd0 100644
--- a/lib/ci/api/runners.rb
+++ b/lib/ci/api/runners.rb
@@ -28,20 +28,17 @@ module Ci
post "register" do
required_attributes! [:token]
+ attributes = { description: params[:description],
+ tag_list: params[:tag_list],
+ run_untagged: params[:run_untagged] || true }
+
runner =
if runner_registration_token_valid?
# Create shared runner. Requires admin access
- Ci::Runner.create(
- description: params[:description],
- tag_list: params[:tag_list],
- is_shared: true
- )
+ Ci::Runner.create(attributes.merge(is_shared: true))
elsif project = Project.find_by(runners_token: params[:token])
# Create a specific runner for project.
- project.runners.create(
- description: params[:description],
- tag_list: params[:tag_list]
- )
+ project.runners.create(attributes)
end
return forbidden! unless runner