Commit 42af2295 authored by Tomasz Maczukin's avatar Tomasz Maczukin

Simplify runner registration token resetting

This icommit adds several changes related to the same topic
- resetting a Runner registration token:

1. On Project settings page it adds a button for resetting the
   registration token and it removes the Runner token field
   that was confusing all GitLab users.

2. On Group settings page it adds the same button for resetting
   the registration token.

3. On Admin Runners settings page it moves the button to the same
   place as in Project and Group settings and it changes slightly
   the page layout to make it more similar to Group and Project
   setting pages.

4. It refactorizes a little the partial that prints runner
   registration description. Thanks to this Project, Group
   and Admin settings of the Runner are re-using the same
   code to generate the button.

5. Updates the translations of changed text.
parent dfb9ac3a
...@@ -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,6 +2,8 @@ ...@@ -2,6 +2,8 @@
- @no_container = true - @no_container = true
%div{ class: container_class } %div{ class: container_class }
.row
.col-sm-6
.bs-callout .bs-callout
%p %p
= (_"A 'Runner' is a process which runs a job. You can set up as many Runners as you need.") = (_"A 'Runner' is a process which runs a job. You can set up as many Runners as you need.")
...@@ -33,23 +35,15 @@ ...@@ -33,23 +35,15 @@
\- \-
= _('Runner will not receive any new jobs') = _('Runner will not receive any new jobs')
.bs-callout.clearfix .col-sm-6
.float-left
%p
= _('You can reset runners registration token by pressing a button below.')
.prepend-top-10
= button_to _('Reset runners registration token'), reset_runners_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',
locals: { registration_token: Gitlab::CurrentSettings.runners_registration_token }
.bs-callout .bs-callout
%p = render partial: 'ci/runner/how_to_setup_runner',
= _('Runners currently online: %{active_runners_count}') % { active_runners_count: @active_runners_count } locals: { registration_token: Gitlab::CurrentSettings.runners_registration_token,
type: 'shared',
reset_token_url: reset_registration_token_admin_application_settings_path }
.row-content-block.second-block .row
.col-sm-9
= form_tag admin_runners_path, id: 'runners-search', method: :get, class: 'filter-form js-filter-form' do = form_tag admin_runners_path, id: 'runners-search', method: :get, class: 'filter-form js-filter-form' do
.filtered-search-wrapper .filtered-search-wrapper
.filtered-search-box .filtered-search-box
...@@ -103,6 +97,9 @@ ...@@ -103,6 +97,9 @@
.filter-dropdown-container .filter-dropdown-container
= render 'sort_dropdown' = render 'sort_dropdown'
.col-sm-3.text-right-lg
= _('Runners currently online: %{active_runners_count}') % { active_runners_count: @active_runners_count }
- if @runners.any? - if @runners.any?
.runners-content.content-list .runners-content.content-list
.table-holder .table-holder
......
...@@ -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'
......
...@@ -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 ""
...@@ -5950,9 +5950,6 @@ msgstr "" ...@@ -5950,9 +5950,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 ""
...@@ -6869,9 +6866,6 @@ msgstr "" ...@@ -6869,9 +6866,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