Commit 8ec0eda9 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch '41922-simplify-runner-registration-token-resetting' into 'master'

Simplify runner registration token resetting

Closes #41922

See merge request gitlab-org/gitlab-ce!21658
parents f3b3ee78 5a60a546
...@@ -67,8 +67,9 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController ...@@ -67,8 +67,9 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
end end
end end
def reset_runners_token def reset_registration_token
@application_setting.reset_runners_registration_token! @application_setting.reset_runners_registration_token!
flash[:notice] = 'New runners registration token has been generated!' flash[:notice] = 'New runners registration token has been generated!'
redirect_to admin_runners_path redirect_to admin_runners_path
end end
......
...@@ -10,6 +10,13 @@ module Groups ...@@ -10,6 +10,13 @@ module Groups
define_secret_variables define_secret_variables
end end
def reset_registration_token
@group.reset_runners_token!
flash[:notice] = 'New runners registration token has been generated!'
redirect_to group_settings_ci_cd_path
end
private private
def define_secret_variables def define_secret_variables
......
...@@ -36,6 +36,13 @@ module Projects ...@@ -36,6 +36,13 @@ module Projects
end end
end end
def reset_registration_token
@project.reset_runners_token!
flash[:notice] = 'New runners registration token has been generated!'
redirect_to namespace_project_settings_ci_cd_path
end
private private
def update_params def update_params
......
...@@ -2,106 +2,103 @@ ...@@ -2,106 +2,103 @@
- @no_container = true - @no_container = true
%div{ class: container_class } %div{ class: container_class }
.bs-callout .row
%p .col-sm-6
= (_"A 'Runner' is a process which runs a job. You can set up as many Runners as you need.") .bs-callout
%br %p
= _('Runners can be placed on separate users, servers, even on your local machine.') = (_"A 'Runner' is a process which runs a job. You can set up as many Runners as you need.")
%br %br
= _('Runners can be placed on separate users, servers, even on your local machine.')
%br
%div %div
%span= _('Each Runner can be in one of the following states:') %span= _('Each Runner can be in one of the following states:')
%ul %ul
%li %li
%span.badge.badge-success shared %span.badge.badge-success shared
\- \-
= _('Runner runs jobs from all unassigned projects') = _('Runner runs jobs from all unassigned projects')
%li %li
%span.badge.badge-success group %span.badge.badge-success group
\- \-
= _('Runner runs jobs from all unassigned projects in its group') = _('Runner runs jobs from all unassigned projects in its group')
%li %li
%span.badge.badge-info specific %span.badge.badge-info specific
\- \-
= _('Runner runs jobs from assigned projects') = _('Runner runs jobs from assigned projects')
%li %li
%span.badge.badge-warning locked %span.badge.badge-warning locked
\- \-
= _('Runner cannot be assigned to other projects') = _('Runner cannot be assigned to other projects')
%li %li
%span.badge.badge-danger paused %span.badge.badge-danger paused
\- \-
= _('Runner will not receive any new jobs') = _('Runner will not receive any new jobs')
.bs-callout.clearfix .col-sm-6
.float-left .bs-callout
%p = render partial: 'ci/runner/how_to_setup_runner',
= _('You can reset runners registration token by pressing a button below.') locals: { registration_token: Gitlab::CurrentSettings.runners_registration_token,
.prepend-top-10 type: 'shared',
= button_to _('Reset runners registration token'), reset_runners_token_admin_application_settings_path, reset_token_url: reset_registration_token_admin_application_settings_path }
method: :put, class: 'btn btn-default',
data: { confirm: _('Are you sure you want to reset registration token?') }
= render partial: 'ci/runner/how_to_setup_shared_runner', .row
locals: { registration_token: Gitlab::CurrentSettings.runners_registration_token } .col-sm-9
= form_tag admin_runners_path, id: 'runners-search', method: :get, class: 'filter-form js-filter-form' do
.filtered-search-wrapper
.filtered-search-box
= dropdown_tag(custom_icon('icon_history'),
options: { wrapper_class: 'filtered-search-history-dropdown-wrapper',
toggle_class: 'filtered-search-history-dropdown-toggle-button',
dropdown_class: 'filtered-search-history-dropdown',
content_class: 'filtered-search-history-dropdown-content',
title: _('Recent searches') }) do
.js-filtered-search-history-dropdown{ data: { full_path: admin_runners_path } }
.filtered-search-box-input-container.droplab-dropdown
.scroll-container
%ul.tokens-container.list-unstyled
%li.input-token
%input.form-control.filtered-search{ { id: 'filtered-search-runners', placeholder: _('Search or filter results...') } }
#js-dropdown-hint.filtered-search-input-dropdown-menu.dropdown-menu.hint-dropdown
%ul{ data: { dropdown: true } }
%li.filter-dropdown-item{ data: { action: 'submit' } }
= button_tag class: %w[btn btn-link] do
= sprite_icon('search')
%span
= _('Press Enter or click to search')
%ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
%li.filter-dropdown-item
= button_tag class: %w[btn btn-link] do
-# Encapsulate static class name `{{icon}}` inside #{} to bypass
-# haml lint's ClassAttributeWithStaticValue
%svg
%use{ 'xlink:href': "#{'{{icon}}'}" }
%span.js-filter-hint
{{hint}}
%span.js-filter-tag.dropdown-light-content
{{tag}}
.bs-callout #js-dropdown-admin-runner-status.filtered-search-input-dropdown-menu.dropdown-menu
%p %ul{ data: { dropdown: true } }
= _('Runners currently online: %{active_runners_count}') % { active_runners_count: @active_runners_count } - Ci::Runner::AVAILABLE_STATUSES.each do |status|
%li.filter-dropdown-item{ data: { value: status } }
= button_tag class: %w[btn btn-link] do
= status.titleize
.row-content-block.second-block #js-dropdown-admin-runner-type.filtered-search-input-dropdown-menu.dropdown-menu
= form_tag admin_runners_path, id: 'runners-search', method: :get, class: 'filter-form js-filter-form' do %ul{ data: { dropdown: true } }
.filtered-search-wrapper - Ci::Runner::AVAILABLE_TYPES.each do |runner_type|
.filtered-search-box %li.filter-dropdown-item{ data: { value: runner_type } }
= dropdown_tag(custom_icon('icon_history'), = button_tag class: %w[btn btn-link] do
options: { wrapper_class: 'filtered-search-history-dropdown-wrapper', = runner_type.titleize
toggle_class: 'filtered-search-history-dropdown-toggle-button',
dropdown_class: 'filtered-search-history-dropdown',
content_class: 'filtered-search-history-dropdown-content',
title: _('Recent searches') }) do
.js-filtered-search-history-dropdown{ data: { full_path: admin_runners_path } }
.filtered-search-box-input-container.droplab-dropdown
.scroll-container
%ul.tokens-container.list-unstyled
%li.input-token
%input.form-control.filtered-search{ { id: 'filtered-search-runners', placeholder: _('Search or filter results...') } }
#js-dropdown-hint.filtered-search-input-dropdown-menu.dropdown-menu.hint-dropdown
%ul{ data: { dropdown: true } }
%li.filter-dropdown-item{ data: { action: 'submit' } }
= button_tag class: %w[btn btn-link] do
= sprite_icon('search')
%span
= _('Press Enter or click to search')
%ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
%li.filter-dropdown-item
= button_tag class: %w[btn btn-link] do
-# Encapsulate static class name `{{icon}}` inside #{} to bypass
-# haml lint's ClassAttributeWithStaticValue
%svg
%use{ 'xlink:href': "#{'{{icon}}'}" }
%span.js-filter-hint
{{hint}}
%span.js-filter-tag.dropdown-light-content
{{tag}}
#js-dropdown-admin-runner-status.filtered-search-input-dropdown-menu.dropdown-menu = button_tag class: %w[clear-search hidden] do
%ul{ data: { dropdown: true } } = icon('times')
- Ci::Runner::AVAILABLE_STATUSES.each do |status| .filter-dropdown-container
%li.filter-dropdown-item{ data: { value: status } } = render 'sort_dropdown'
= button_tag class: %w[btn btn-link] do
= status.titleize
#js-dropdown-admin-runner-type.filtered-search-input-dropdown-menu.dropdown-menu .col-sm-3.text-right-lg
%ul{ data: { dropdown: true } } = _('Runners currently online: %{active_runners_count}') % { active_runners_count: @active_runners_count }
- Ci::Runner::AVAILABLE_TYPES.each do |runner_type|
%li.filter-dropdown-item{ data: { value: runner_type } }
= button_tag class: %w[btn btn-link] do
= runner_type.titleize
= button_tag class: %w[clear-search hidden] do
= icon('times')
.filter-dropdown-container
= render 'sort_dropdown'
- if @runners.any? - if @runners.any?
.runners-content.content-list .runners-content.content-list
......
...@@ -13,5 +13,9 @@ ...@@ -13,5 +13,9 @@
= _("Use the following registration token during setup:") = _("Use the following registration token during setup:")
%code#registration_token= registration_token %code#registration_token= registration_token
= clipboard_button(target: '#registration_token', title: _("Copy token to clipboard"), class: "btn-transparent btn-clipboard") = clipboard_button(target: '#registration_token', title: _("Copy token to clipboard"), class: "btn-transparent btn-clipboard")
.prepend-top-10.append-bottom-10
= button_to _("Reset runners registration token"), reset_token_url,
method: :put, class: 'btn btn-default',
data: { confirm: _("Are you sure you want to reset registration token?") }
%li %li
= _("Start the Runner!") = _("Start the Runner!")
.bs-callout.help-callout
= render partial: 'ci/runner/how_to_setup_runner',
locals: { registration_token: registration_token, type: 'shared' }
.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'
%hr
= render partial: 'ci/runner/how_to_setup_runner',
locals: { registration_token: registration_token, type: 'specific' }
...@@ -11,7 +11,9 @@ ...@@ -11,7 +11,9 @@
-# https://gitlab.com/gitlab-org/gitlab-ce/issues/45894 -# https://gitlab.com/gitlab-org/gitlab-ce/issues/45894
- if can?(current_user, :admin_pipeline, @group) - if can?(current_user, :admin_pipeline, @group)
= render partial: 'ci/runner/how_to_setup_runner', = render partial: 'ci/runner/how_to_setup_runner',
locals: { registration_token: @group.runners_token, type: 'group' } locals: { registration_token: @group.runners_token,
type: 'group',
reset_token_url: reset_registration_token_group_settings_ci_cd_path }
- if @group.runners.empty? - if @group.runners.empty?
%h4.underlined-title %h4.underlined-title
......
%h3 %h3
= _('Specific Runners') = _('Specific Runners')
= render partial: 'ci/runner/how_to_setup_specific_runner', .bs-callout.help-callout
locals: { registration_token: @project.runners_token } .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'
%hr
= render partial: 'ci/runner/how_to_setup_runner',
locals: { registration_token: @project.runners_token,
type: 'specific',
reset_token_url: reset_registration_token_namespace_project_settings_ci_cd_path }
- if @project_runners.any? - if @project_runners.any?
%h4.underlined-title Runners activated for this project %h4.underlined-title Runners activated for this project
......
...@@ -3,16 +3,6 @@ ...@@ -3,16 +3,6 @@
= form_for @project, url: project_settings_ci_cd_path(@project, anchor: 'js-general-pipeline-settings') do |f| = form_for @project, url: project_settings_ci_cd_path(@project, anchor: 'js-general-pipeline-settings') do |f|
= form_errors(@project) = form_errors(@project)
%fieldset.builds-feature %fieldset.builds-feature
.form-group.append-bottom-default.js-secret-runner-token
= f.label :runners_token, _("Runner token"), class: 'label-bold'
.form-control.js-secret-value-placeholder
= '*' * 20
= f.text_field :runners_token, class: "form-control hide js-secret-value", placeholder: 'xEeFCaDAB89'
%p.form-text.text-muted= _("The secure token used by the Runner to checkout the project")
%button.btn.btn-info.prepend-top-10.js-secret-value-reveal-button{ type: 'button', data: { secret_reveal_status: 'false' } }
= _('Reveal value')
%hr
.form-group .form-group
%h5.prepend-top-0 %h5.prepend-top-0
= _("Git strategy for pipelines") = _("Git strategy for pipelines")
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
%button.btn.js-settings-toggle{ type: 'button' } %button.btn.js-settings-toggle{ type: 'button' }
= expanded ? _('Collapse') : _('Expand') = expanded ? _('Collapse') : _('Expand')
%p %p
= _("Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report.") = _("Customize your pipeline configuration, view your pipeline status and coverage report.")
.settings-content .settings-content
= render 'form' = render 'form'
......
---
title: Simplify runner registration token resetting
merge_request: 21658
author:
type: changed
...@@ -107,7 +107,7 @@ namespace :admin do ...@@ -107,7 +107,7 @@ namespace :admin do
resource :application_settings, only: [:show, :update] do resource :application_settings, only: [:show, :update] do
resources :services, only: [:index, :edit, :update] resources :services, only: [:index, :edit, :update]
get :usage_data get :usage_data
put :reset_runners_token put :reset_registration_token
put :reset_health_check_token put :reset_health_check_token
put :clear_repository_check_states put :clear_repository_check_states
get :integrations, :repository, :templates, :ci_cd, :reporting, :metrics_and_profiling, :network, :geo, :preferences get :integrations, :repository, :templates, :ci_cd, :reporting, :metrics_and_profiling, :network, :geo, :preferences
......
...@@ -27,7 +27,9 @@ constraints(::Constraints::GroupUrlConstrainer.new) do ...@@ -27,7 +27,9 @@ constraints(::Constraints::GroupUrlConstrainer.new) do
as: :group, as: :group,
constraints: { group_id: Gitlab::PathRegex.full_namespace_route_regex }) do constraints: { group_id: Gitlab::PathRegex.full_namespace_route_regex }) do
namespace :settings do namespace :settings do
resource :ci_cd, only: [:show], controller: 'ci_cd' resource :ci_cd, only: [:show], controller: 'ci_cd' do
put :reset_registration_token
end
end end
resource :variables, only: [:show, :update] resource :variables, only: [:show, :update]
......
...@@ -437,6 +437,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do ...@@ -437,6 +437,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
get :members, to: redirect("%{namespace_id}/%{project_id}/project_members") get :members, to: redirect("%{namespace_id}/%{project_id}/project_members")
resource :ci_cd, only: [:show, :update], controller: 'ci_cd' do resource :ci_cd, only: [:show, :update], controller: 'ci_cd' do
post :reset_cache post :reset_cache
put :reset_registration_token
end end
resource :integrations, only: [:show] resource :integrations, only: [:show]
resource :repository, only: [:show], controller: :repository do resource :repository, only: [:show], controller: :repository do
......
...@@ -480,7 +480,7 @@ msgstr "" ...@@ -480,7 +480,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -360,7 +360,7 @@ msgstr "" ...@@ -360,7 +360,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -360,7 +360,7 @@ msgstr "" ...@@ -360,7 +360,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -420,7 +420,7 @@ msgstr "" ...@@ -420,7 +420,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -360,7 +360,7 @@ msgstr "" ...@@ -360,7 +360,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -360,7 +360,7 @@ msgstr "" ...@@ -360,7 +360,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "Zugriff auf fehlerhafte Speicher wurde vorübergehend deaktiviert, um die Wiederherstellung zu ermöglichen. Für den zukünftigen Zugriff, behebe bitte das Problem und setze danach die Speicherinformationen zurück." msgstr "Zugriff auf fehlerhafte Speicher wurde vorübergehend deaktiviert, um die Wiederherstellung zu ermöglichen. Für den zukünftigen Zugriff, behebe bitte das Problem und setze danach die Speicherinformationen zurück."
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -360,7 +360,7 @@ msgstr "" ...@@ -360,7 +360,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -360,7 +360,7 @@ msgstr "" ...@@ -360,7 +360,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -360,7 +360,7 @@ msgstr "" ...@@ -360,7 +360,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -360,7 +360,7 @@ msgstr "" ...@@ -360,7 +360,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -360,7 +360,7 @@ msgstr "Accès à « %{classification_label} » non autorisé" ...@@ -360,7 +360,7 @@ msgstr "Accès à « %{classification_label} » non autorisé"
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "L’accès aux stockages défaillants a été temporairement désactivé pour permettre la récupération du montage. Réinitialisez les informations de stockage quand le problème sera résolu pour permettre à nouveau l’accès." msgstr "L’accès aux stockages défaillants a été temporairement désactivé pour permettre la récupération du montage. Réinitialisez les informations de stockage quand le problème sera résolu pour permettre à nouveau l’accès."
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "Accédez à votre jeton d’exécuteur, personnalisez la configuration de votre pipeline et affichez l’état de votre pipeline et le rapport de couverture." msgstr "Accédez à votre jeton d’exécuteur, personnalisez la configuration de votre pipeline et affichez l’état de votre pipeline et le rapport de couverture."
msgid "Account" msgid "Account"
......
...@@ -317,9 +317,6 @@ msgstr "" ...@@ -317,9 +317,6 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report."
msgstr ""
msgid "Account" msgid "Account"
msgstr "" msgstr ""
...@@ -2090,6 +2087,9 @@ msgstr "" ...@@ -2090,6 +2087,9 @@ msgstr ""
msgid "Customize how Google Code email addresses and usernames are imported into GitLab. In the next step, you'll be able to select the projects you want to import." msgid "Customize how Google Code email addresses and usernames are imported into GitLab. In the next step, you'll be able to select the projects you want to import."
msgstr "" msgstr ""
msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr ""
msgid "Cycle Analytics" msgid "Cycle Analytics"
msgstr "" msgstr ""
...@@ -5986,9 +5986,6 @@ msgstr "" ...@@ -5986,9 +5986,6 @@ msgstr ""
msgid "The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request." msgid "The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request."
msgstr "" msgstr ""
msgid "The secure token used by the Runner to checkout the project"
msgstr ""
msgid "The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time." msgid "The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time."
msgstr "" msgstr ""
...@@ -6950,9 +6947,6 @@ msgstr "" ...@@ -6950,9 +6947,6 @@ msgstr ""
msgid "You can only edit files when you are on a branch" msgid "You can only edit files when you are on a branch"
msgstr "" msgstr ""
msgid "You can reset runners registration token by pressing a button below."
msgstr ""
msgid "You can resolve the merge conflict using either the Interactive mode, by choosing %{use_ours} or %{use_theirs} buttons, or by editing the files directly. Commit these changes into %{branch_name}" msgid "You can resolve the merge conflict using either the Interactive mode, by choosing %{use_ours} or %{use_theirs} buttons, or by editing the files directly. Commit these changes into %{branch_name}"
msgstr "" msgstr ""
......
...@@ -360,7 +360,7 @@ msgstr "" ...@@ -360,7 +360,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -420,7 +420,7 @@ msgstr "" ...@@ -420,7 +420,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -330,7 +330,7 @@ msgstr "" ...@@ -330,7 +330,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -360,7 +360,7 @@ msgstr "" ...@@ -360,7 +360,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "L'accesso agli storages è stato temporaneamente disabilitato per consentire il mount di ripristino. Resetta le info d'archiviazione dopo che l'issue è stato risolto per consentire nuovamente l'accesso." msgstr "L'accesso agli storages è stato temporaneamente disabilitato per consentire il mount di ripristino. Resetta le info d'archiviazione dopo che l'issue è stato risolto per consentire nuovamente l'accesso."
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -330,7 +330,7 @@ msgstr "'%{classification_label}'へのアクセスは許可されていませ ...@@ -330,7 +330,7 @@ msgstr "'%{classification_label}'へのアクセスは許可されていませ
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "mount によって復旧できるように、失敗が発生しているストレージへのアクセスを一時的に抑止しました。再度アクセスするためには、問題を解決してからストレージ情報をリセットしてください。" msgstr "mount によって復旧できるように、失敗が発生しているストレージへのアクセスを一時的に抑止しました。再度アクセスするためには、問題を解決してからストレージ情報をリセットしてください。"
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "Runner トークンにアクセスし、パイプラインの設定をカスタマイズ、そしてパイプラインの状態とカバレッジレポートを閲覧します。" msgstr "Runner トークンにアクセスし、パイプラインの設定をカスタマイズ、そしてパイプラインの状態とカバレッジレポートを閲覧します。"
msgid "Account" msgid "Account"
......
...@@ -330,7 +330,7 @@ msgstr "" ...@@ -330,7 +330,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "오동작중인 저장공간에 대한 접근이 복구 작업을 위해 마운트할 수 있도록 임시로 허용되었습니다. 문제가 해결된 후 다시 접근을 허용할 수 있게 저장공간 정보를 리셋 해주세요." msgstr "오동작중인 저장공간에 대한 접근이 복구 작업을 위해 마운트할 수 있도록 임시로 허용되었습니다. 문제가 해결된 후 다시 접근을 허용할 수 있게 저장공간 정보를 리셋 해주세요."
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -360,7 +360,7 @@ msgstr "" ...@@ -360,7 +360,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -420,7 +420,7 @@ msgstr "" ...@@ -420,7 +420,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -360,7 +360,7 @@ msgstr "Acesso a '%{classification_label}' não permitido" ...@@ -360,7 +360,7 @@ msgstr "Acesso a '%{classification_label}' não permitido"
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "Os acessos à storages com defeito foram temporariamente desabilitados para permitir a sua remontagem. Redefina as informações de armazenamento depois que o problema foi resolvido para permitir o acesso de novo." msgstr "Os acessos à storages com defeito foram temporariamente desabilitados para permitir a sua remontagem. Redefina as informações de armazenamento depois que o problema foi resolvido para permitir o acesso de novo."
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "Acesse seu runner token, personalize sua configuração de pipeline e visualize o status do seu pipeline e o relatório de coverage." msgstr "Acesse seu runner token, personalize sua configuração de pipeline e visualize o status do seu pipeline e o relatório de coverage."
msgid "Account" msgid "Account"
......
...@@ -390,7 +390,7 @@ msgstr "" ...@@ -390,7 +390,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -420,7 +420,7 @@ msgstr "" ...@@ -420,7 +420,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "Доступ к вышедшим из строя хранилищам временно отключен для возможности монтирования в целях восстановления. Сбросьте информацию о хранилищах после устранения проблемы, чтобы разрешить доступ." msgstr "Доступ к вышедшим из строя хранилищам временно отключен для возможности монтирования в целях восстановления. Сбросьте информацию о хранилищах после устранения проблемы, чтобы разрешить доступ."
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -360,7 +360,7 @@ msgstr "" ...@@ -360,7 +360,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -360,7 +360,7 @@ msgstr "" ...@@ -360,7 +360,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "" msgstr ""
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -420,7 +420,7 @@ msgstr "Доступ до \"%{classification_label}\" заборонено" ...@@ -420,7 +420,7 @@ msgstr "Доступ до \"%{classification_label}\" заборонено"
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "Доступ до сховищ, що вийшли з ладу, тимчасово прибраний задля відновлення монтування. Після вирішення проблеми обнуліть інформацію сховища для відновлення доступу." msgstr "Доступ до сховищ, що вийшли з ладу, тимчасово прибраний задля відновлення монтування. Після вирішення проблеми обнуліть інформацію сховища для відновлення доступу."
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "Отримайте доступ до Gitlab Runner токену, налаштуйте конфігурацію конвеєра та перегляньте його статус, а також звіт про покриття." msgstr "Отримайте доступ до Gitlab Runner токену, налаштуйте конфігурацію конвеєра та перегляньте його статус, а також звіт про покриття."
msgid "Account" msgid "Account"
......
...@@ -330,7 +330,7 @@ msgstr "不允许访问%{classification_label}" ...@@ -330,7 +330,7 @@ msgstr "不允许访问%{classification_label}"
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "为方便修复挂载问题,访问故障存储已被暂时禁用。在问题解决后请重置存储运行状况信息,以允许再次访问。" msgstr "为方便修复挂载问题,访问故障存储已被暂时禁用。在问题解决后请重置存储运行状况信息,以允许再次访问。"
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "访问您的 runner 令牌,自定义流水线配置,以及查看流水线状态和覆盖率报告。" msgstr "访问您的 runner 令牌,自定义流水线配置,以及查看流水线状态和覆盖率报告。"
msgid "Account" msgid "Account"
......
...@@ -330,7 +330,7 @@ msgstr "" ...@@ -330,7 +330,7 @@ msgstr ""
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "因恢復安裝,訪問故障存儲已被暫時禁用。在問題解決後將重置存儲信息,以便再次訪問。" msgstr "因恢復安裝,訪問故障存儲已被暫時禁用。在問題解決後將重置存儲信息,以便再次訪問。"
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "" msgstr ""
msgid "Account" msgid "Account"
......
...@@ -330,7 +330,7 @@ msgstr "不允許存取「%{classification_label}」" ...@@ -330,7 +330,7 @@ msgstr "不允許存取「%{classification_label}」"
msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again." msgid "Access to failing storages has been temporarily disabled to allow the mount to recover. Reset storage information after the issue has been resolved to allow access again."
msgstr "已暫時停用失敗的 Git 儲存空間。當儲存空間恢復正常後,請重置儲存空間健康指數。" msgstr "已暫時停用失敗的 Git 儲存空間。當儲存空間恢復正常後,請重置儲存空間健康指數。"
msgid "Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
msgstr "存取您執行器憑證,自定義您的流水線配置,並查看你的流水現狀態及測試涵蓋率報告。" msgstr "存取您執行器憑證,自定義您的流水線配置,並查看你的流水現狀態及測試涵蓋率報告。"
msgid "Account" msgid "Account"
......
...@@ -86,4 +86,22 @@ describe Admin::ApplicationSettingsController do ...@@ -86,4 +86,22 @@ describe Admin::ApplicationSettingsController do
expect(ApplicationSetting.current.receive_max_input_size).to eq(1024) expect(ApplicationSetting.current.receive_max_input_size).to eq(1024)
end end
end end
describe 'PUT #reset_registration_token' do
before do
sign_in(admin)
end
subject { put :reset_registration_token }
it 'resets runner registration token' do
expect { subject }.to change { ApplicationSetting.current.runners_registration_token }
end
it 'redirects the user to admin runners page' do
subject
expect(response).to redirect_to(admin_runners_path)
end
end
end end
...@@ -17,4 +17,18 @@ describe Groups::Settings::CiCdController do ...@@ -17,4 +17,18 @@ describe Groups::Settings::CiCdController do
expect(response).to render_template(:show) expect(response).to render_template(:show)
end end
end end
describe 'PUT #reset_registration_token' do
subject { put :reset_registration_token, group_id: group }
it 'resets runner registration token' do
expect { subject }.to change { group.reload.runners_token }
end
it 'redirects the user to admin runners page' do
subject
expect(response).to redirect_to(group_settings_ci_cd_path)
end
end
end end
...@@ -74,6 +74,19 @@ describe Projects::Settings::CiCdController do ...@@ -74,6 +74,19 @@ describe Projects::Settings::CiCdController do
end end
end end
describe 'PUT #reset_registration_token' do
subject { put :reset_registration_token, namespace_id: project.namespace, project_id: project }
it 'resets runner registration token' do
expect { subject }.to change { project.reload.runners_token }
end
it 'redirects the user to admin runners page' do
subject
expect(response).to redirect_to(namespace_project_settings_ci_cd_path)
end
end
describe 'PATCH update' do describe 'PATCH update' do
let(:params) { { ci_config_path: '' } } let(:params) { { ci_config_path: '' } }
......
# frozen_string_literal: true
require 'spec_helper'
describe 'Group CI/CD settings' do
include WaitForRequests
let(:user) {create(:user)}
let(:group) {create(:group)}
before do
group.add_owner(user)
sign_in(user)
end
describe 'runners registration token' do
let!(:token) { group.runners_token }
before do
visit group_settings_ci_cd_path(group)
end
it 'has a registration token' do
expect(page.find('#registration_token')).to have_content(token)
end
describe 'reload registration token' do
let(:page_token) { find('#registration_token').text }
before do
click_button 'Reset runners registration token'
end
it 'changes registration token' do
expect(page_token).not_to eq token
end
end
end
end
...@@ -137,5 +137,29 @@ describe "Projects > Settings > Pipelines settings" do ...@@ -137,5 +137,29 @@ describe "Projects > Settings > Pipelines settings" do
end end
end end
end end
describe 'runners registration token' do
let!(:token) { project.runners_token }
before do
visit project_settings_ci_cd_path(project)
end
it 'has a registration token' do
expect(page.find('#registration_token')).to have_content(token)
end
describe 'reload registration token' do
let(:page_token) { find('#registration_token').text }
before do
click_button 'Reset runners registration token'
end
it 'changes registration token' do
expect(page_token).not_to eq token
end
end
end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment