diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-04-30 17:00:28 +0400 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-04-30 17:01:35 +0400 |
commit | 0d30b00de807df550bec947751c098317c5bb79f (patch) | |
tree | fa9ed7849bcaf0ed07a96143ef72d9a1018c730d /lib/api | |
parent | 3dbcc02db0c1fda22044a743158d4ba9e4eda637 (diff) | |
download | gitlab-ce-0d30b00de807df550bec947751c098317c5bb79f.tar.gz |
Start persisting runner_type when creating runners
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/runner.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/runner.rb b/lib/api/runner.rb index 49d9b0b1b4f..67896ae1fc5 100644 --- a/lib/api/runner.rb +++ b/lib/api/runner.rb @@ -23,13 +23,13 @@ module API runner = if runner_registration_token_valid? # Create shared runner. Requires admin access - Ci::Runner.create(attributes.merge(is_shared: true)) + Ci::Runner.create(attributes.merge(is_shared: true, runner_type: :instance_type)) elsif project = Project.find_by(runners_token: params[:token]) # Create a specific runner for the project - project.runners.create(attributes) + project.runners.create(attributes.merge(runner_type: :project_type)) elsif group = Group.find_by(runners_token: params[:token]) # Create a specific runner for the group - group.runners.create(attributes) + group.runners.create(attributes.merge(runner_type: :group_type)) end break forbidden! unless runner |