summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormfluharty <mfluharty@gitlab.com>2019-09-09 08:50:03 -0600
committermfluharty <mfluharty@gitlab.com>2019-09-09 12:50:35 -0600
commita07bab86f03e156a07c7f7fe61d1c363d4970664 (patch)
tree60381ac1be06c1b900d6c676803d634b01edd100
parenta4a15970c2334bb2bc48e88dbdb7be3a476cbe6d (diff)
downloadgitlab-ce-63768-group-settings-kubernetes-runner-section.tar.gz
Add kubernetes section to group runner settings63768-group-settings-kubernetes-runner-section
Move existing kubernetes section to its own file Render it in project runner setting and group runner settings
-rw-r--r--app/views/ci/runner/_how_to_setup_runner_automatically.html.haml22
-rw-r--r--app/views/groups/runners/_group_runners.html.haml4
-rw-r--r--app/views/projects/runners/_specific_runners.html.haml25
-rw-r--r--changelogs/unreleased/63768-group-settings-kubernetes-runner-section.yml5
-rw-r--r--locale/gitlab.pot4
5 files changed, 36 insertions, 24 deletions
diff --git a/app/views/ci/runner/_how_to_setup_runner_automatically.html.haml b/app/views/ci/runner/_how_to_setup_runner_automatically.html.haml
new file mode 100644
index 00000000000..58d2ef5d5e6
--- /dev/null
+++ b/app/views/ci/runner/_how_to_setup_runner_automatically.html.haml
@@ -0,0 +1,22 @@
+.append-bottom-10
+ %h4= _('Set up a %{type} Runner automatically') % { type: type }
+
+%p
+ - link_to_help_page = link_to(_('Learn more about Kubernetes'),
+ help_page_path('user/project/clusters/index'),
+ target: '_blank',
+ rel: 'noopener noreferrer')
+
+ = _('You can easily install a Runner on a Kubernetes cluster. %{link_to_help_page}').html_safe % { link_to_help_page: link_to_help_page }
+
+%ol
+ %li
+ = _('Click the button below to begin the install process by navigating to the Kubernetes page')
+ %li
+ = _('Select an existing Kubernetes cluster or create a new one')
+ %li
+ = _('From the Kubernetes cluster details view, install Runner from the applications list')
+
+= link_to _('Install Runner on Kubernetes'),
+ clusters_path,
+ class: 'btn btn-info'
diff --git a/app/views/groups/runners/_group_runners.html.haml b/app/views/groups/runners/_group_runners.html.haml
index 806a24e2bbc..a2a382c76db 100644
--- a/app/views/groups/runners/_group_runners.html.haml
+++ b/app/views/groups/runners/_group_runners.html.haml
@@ -10,6 +10,10 @@
-# Proper policies should be implemented per
-# https://gitlab.com/gitlab-org/gitlab-ce/issues/45894
- if can?(current_user, :admin_pipeline, @group)
+ = render partial: 'ci/runner/how_to_setup_runner_automatically',
+ locals: { type: 'group',
+ clusters_path: group_clusters_path(@group) }
+ %hr
= render partial: 'ci/runner/how_to_setup_runner',
locals: { registration_token: @group.runners_token,
type: 'group',
diff --git a/app/views/projects/runners/_specific_runners.html.haml b/app/views/projects/runners/_specific_runners.html.haml
index dc56a515d4c..4cc67a8f5d8 100644
--- a/app/views/projects/runners/_specific_runners.html.haml
+++ b/app/views/projects/runners/_specific_runners.html.haml
@@ -2,28 +2,9 @@
= _('Specific Runners')
.bs-callout.help-callout
- .append-bottom-10
- %h4= _('Set up a specific Runner automatically')
-
- %p
- - link_to_help_page = link_to(_('Learn more about Kubernetes'),
- help_page_path('user/project/clusters/index'),
- target: '_blank',
- rel: 'noopener noreferrer')
-
- = _('You can easily install a Runner on a Kubernetes cluster. %{link_to_help_page}').html_safe % { link_to_help_page: link_to_help_page }
-
- %ol
- %li
- = _('Click the button below to begin the install process by navigating to the Kubernetes page')
- %li
- = _('Select an existing Kubernetes cluster or create a new one')
- %li
- = _('From the Kubernetes cluster details view, install Runner from the applications list')
-
- = link_to _('Install Runner on Kubernetes'),
- project_clusters_path(@project),
- class: 'btn btn-info'
+ = render partial: 'ci/runner/how_to_setup_runner_automatically',
+ locals: { type: 'specific',
+ clusters_path: project_clusters_path(@project) }
%hr
= render partial: 'ci/runner/how_to_setup_runner',
locals: { registration_token: @project.runners_token,
diff --git a/changelogs/unreleased/63768-group-settings-kubernetes-runner-section.yml b/changelogs/unreleased/63768-group-settings-kubernetes-runner-section.yml
new file mode 100644
index 00000000000..6930586f554
--- /dev/null
+++ b/changelogs/unreleased/63768-group-settings-kubernetes-runner-section.yml
@@ -0,0 +1,5 @@
+---
+title: Add kubernetes section to group runner settings
+merge_request: 32823
+author:
+type: added
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index a77d70a5700..f04ef5a30bc 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -10431,10 +10431,10 @@ msgstr ""
msgid "Set up CI/CD"
msgstr ""
-msgid "Set up a %{type} Runner manually"
+msgid "Set up a %{type} Runner automatically"
msgstr ""
-msgid "Set up a specific Runner automatically"
+msgid "Set up a %{type} Runner manually"
msgstr ""
msgid "Set up new U2F device"