diff options
author | Phil Hughes <me@iamphill.com> | 2018-05-04 13:40:41 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-05-04 13:40:41 +0100 |
commit | 80617b9039ccbeeec07e299e41690be6ce2d95ec (patch) | |
tree | dc34efce00b956309c147ea59a786b58b47805b6 /lib/api/runner.rb | |
parent | cb8682b841b92cb6f97906bb9289ccbb13f2f31e (diff) | |
parent | d9f3af500c1c3135a63014904459e5a4ab6bc395 (diff) | |
download | gitlab-ce-80617b9039ccbeeec07e299e41690be6ce2d95ec.tar.gz |
Merge branch '44846-improve-web-ide-left-panel-and-modes' into ide-sidebar-commit-box
Diffstat (limited to 'lib/api/runner.rb')
-rw-r--r-- | lib/api/runner.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/api/runner.rb b/lib/api/runner.rb index 4d4fbe50f9f..67896ae1fc5 100644 --- a/lib/api/runner.rb +++ b/lib/api/runner.rb @@ -23,10 +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 project. - project.runners.create(attributes) + # Create a specific runner for the project + 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.merge(runner_type: :group_type)) end break forbidden! unless runner |