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
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-05-01 12:11:57 +0300
committerDylan Griffith <dyl.griffith@gmail.com>2018-05-01 12:11:57 +0300
commit36cdd1e7179aedee7af42d100a208fc1c01e6c63 (patch)
treeccd89a96cd724e69dd2b93d2218dc0943f4a1361
parent1a6d9789db04c3caa4f15ea76399c417f310a6a7 (diff)
Use group_type? where possible during transition period
-rw-r--r--app/services/ci/register_job_service.rb2
-rw-r--r--app/views/admin/runners/_runner.html.haml4
-rw-r--r--app/views/admin/runners/show.html.haml2
-rw-r--r--spec/services/ci/register_job_service_spec.rb2
4 files changed, 5 insertions, 5 deletions
diff --git a/app/services/ci/register_job_service.rb b/app/services/ci/register_job_service.rb
index 138bab88059..8f8a5fbb2b0 100644
--- a/app/services/ci/register_job_service.rb
+++ b/app/services/ci/register_job_service.rb
@@ -17,7 +17,7 @@ module Ci
builds =
if runner.shared?
builds_for_shared_runner
- elsif runner.assigned_to_group?
+ elsif runner.group_type?
builds_for_group_runner
else
builds_for_project_runner
diff --git a/app/views/admin/runners/_runner.html.haml b/app/views/admin/runners/_runner.html.haml
index 6670ba6aa89..6e76e7c2768 100644
--- a/app/views/admin/runners/_runner.html.haml
+++ b/app/views/admin/runners/_runner.html.haml
@@ -2,7 +2,7 @@
%td
- if runner.shared?
%span.label.label-success shared
- - elsif runner.assigned_to_group?
+ - elsif runner.group_type?
%span.label.label-success group
- else
%span.label.label-info specific
@@ -21,7 +21,7 @@
%td
= runner.ip_address
%td
- - if runner.shared? || runner.assigned_to_group?
+ - if runner.shared? || runner.group_type?
n/a
- else
= runner.projects.count(:all)
diff --git a/app/views/admin/runners/show.html.haml b/app/views/admin/runners/show.html.haml
index ab2c9ad1e57..3b5fedfb058 100644
--- a/app/views/admin/runners/show.html.haml
+++ b/app/views/admin/runners/show.html.haml
@@ -19,7 +19,7 @@
%p
If you want Runners to build only specific projects, enable them in the table below.
Keep in mind that this is a one way transition.
-- elsif @runner.assigned_to_group?
+- elsif @runner.group_type?
.bs-callout.bs-callout-success
%h4 This runner will process jobs from all projects in its group and subgroups
- else
diff --git a/spec/services/ci/register_job_service_spec.rb b/spec/services/ci/register_job_service_spec.rb
index 7d3c43eeaf7..256d0027d72 100644
--- a/spec/services/ci/register_job_service_spec.rb
+++ b/spec/services/ci/register_job_service_spec.rb
@@ -8,7 +8,7 @@ module Ci
let!(:pending_job) { create :ci_build, pipeline: pipeline }
let!(:shared_runner) { create :ci_runner, is_shared: true }
let!(:specific_runner) { create :ci_runner, is_shared: false }
- let!(:group_runner) { create :ci_runner, groups: [group] }
+ let!(:group_runner) { create :ci_runner, groups: [group], runner_type: :group_type }
before do
specific_runner.assign_to(project)