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/app
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2018-05-09 09:55:20 +0300
committerFilipa Lacerda <filipa@gitlab.com>2018-05-09 12:02:26 +0300
commitae992c6a85018462c775457c3d8af15022a2e17f (patch)
tree821f01e099be45370bd9d74f40d89a4d8ce35ad7 /app
parent7c3c068537d2186dba414f68a78e85fe34b36f78 (diff)
Merge branch 'add-runner-type-to-cluster-app' into 'master'
Set `runner_type` for cluster/application See merge request gitlab-org/gitlab-ce!18832
Diffstat (limited to 'app')
-rw-r--r--app/models/clusters/applications/runner.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/models/clusters/applications/runner.rb b/app/models/clusters/applications/runner.rb
index 16efe90fa27..b881b4eaf36 100644
--- a/app/models/clusters/applications/runner.rb
+++ b/app/models/clusters/applications/runner.rb
@@ -43,12 +43,20 @@ module Clusters
def create_and_assign_runner
transaction do
- project.runners.create!(name: 'kubernetes-cluster', tag_list: %w(kubernetes cluster)).tap do |runner|
+ project.runners.create!(runner_create_params).tap do |runner|
update!(runner_id: runner.id)
end
end
end
+ def runner_create_params
+ {
+ name: 'kubernetes-cluster',
+ runner_type: :project_type,
+ tag_list: %w(kubernetes cluster)
+ }
+ end
+
def gitlab_url
Gitlab::Routing.url_helpers.root_url(only_path: false)
end