diff --git a/.rubocop_todo/rspec/factory_bot/avoid_create.yml b/.rubocop_todo/rspec/factory_bot/avoid_create.yml index c4a64f505f180547e90dd1a4e09433d2146e7b3b..8fb2327f049b297e15bff44f5e2437ec65737bc6 100644 --- a/.rubocop_todo/rspec/factory_bot/avoid_create.yml +++ b/.rubocop_todo/rspec/factory_bot/avoid_create.yml @@ -629,7 +629,6 @@ RSpec/FactoryBot/AvoidCreate: - 'spec/views/projects/pipeline_schedules/_pipeline_schedule.html.haml_spec.rb' - 'spec/views/projects/pipelines/show.html.haml_spec.rb' - 'spec/views/projects/project_members/index.html.haml_spec.rb' - - 'spec/views/projects/runners/_specific_runners.html.haml_spec.rb' - 'spec/views/projects/settings/ci_cd/_autodevops_form.html.haml_spec.rb' - 'spec/views/projects/settings/integrations/edit.html.haml_spec.rb' - 'spec/views/projects/settings/merge_requests/show.html.haml_spec.rb' diff --git a/app/services/ci/runners/register_runner_service.rb b/app/services/ci/runners/register_runner_service.rb index abd32610cecf84597014f5a718faf5ba25955a07..db16b86d5e6c05d6639c86cbe9a6d21ee99315c3 100644 --- a/app/services/ci/runners/register_runner_service.rb +++ b/app/services/ci/runners/register_runner_service.rb @@ -46,10 +46,10 @@ def check_token(registration_token) # Create shared runner. Requires admin access { runner_type: :instance_type } elsif runner_registrar_valid?('project') && project = ::Project.find_by_runners_token(registration_token) - # Create a specific runner for the project + # Create a project runner { runner_type: :project_type, scope: project } elsif runner_registrar_valid?('group') && group = ::Group.find_by_runners_token(registration_token) - # Create a specific runner for the group + # Create a group runner { runner_type: :group_type, scope: group } end end diff --git a/app/views/projects/runners/_specific_runners.html.haml b/app/views/projects/runners/_project_runners.html.haml similarity index 81% rename from app/views/projects/runners/_specific_runners.html.haml rename to app/views/projects/runners/_project_runners.html.haml index f3a7037bdababe383f33594e0f1d3dd14fa68f43..fc4377e2f9813f17b2e0b53d9a3c70268814960b 100644 --- a/app/views/projects/runners/_specific_runners.html.haml +++ b/app/views/projects/runners/_project_runners.html.haml @@ -1,9 +1,9 @@ %h4 - = _('Specific runners') + = s_('Runners|Project runners') .bs-callout.help-callout - if can?(current_user, :register_project_runners, @project) - = _('These runners are specific to this project.') + = s_('Runners|These runners are assigned to this project.') - if params[:ci_runner_templates] %hr = render partial: 'ci/runner/setup_runner_in_aws', @@ -11,7 +11,7 @@ %hr = render partial: 'ci/runner/how_to_setup_runner', locals: { registration_token: @project.runners_token, - type: s_('Runners|specific'), + type: _('project'), reset_token_url: reset_registration_token_namespace_project_settings_ci_cd_path, project_path: @project.path_with_namespace, group_path: '' } @@ -22,13 +22,13 @@ %hr - if @project_runners.any? - %h4.underlined-title= _('Available specific runners') - %ul.bordered-list.activated-specific-runners + %h4.underlined-title= s_('Runners|Assigned project runners') + %ul.bordered-list{ data: { testid: 'assigned_project_runners' } } = render partial: 'projects/runners/runner', collection: @project_runners, as: :runner = paginate @project_runners, theme: "gitlab", param_name: "project_page", params: { expand_runners: true, anchor: 'js-runners-settings' } - if @assignable_runners.any? %h4.underlined-title= _('Other available runners') - %ul.bordered-list.available-specific-runners + %ul.bordered-list{ data: { testid: 'available_project_runners' } } = render partial: 'projects/runners/runner', collection: @assignable_runners, as: :runner = paginate @assignable_runners, theme: "gitlab", param_name: "specific_page", :params => { :anchor => 'js-runners-settings'} diff --git a/app/views/projects/runners/_settings.html.haml b/app/views/projects/runners/_settings.html.haml index a02bdac442b606ce863d2e96a46fec1264acec27..f85b5fd98666c37120f84b2e2828a126a2bd5cc9 100644 --- a/app/views/projects/runners/_settings.html.haml +++ b/app/views/projects/runners/_settings.html.haml @@ -2,7 +2,7 @@ .row .col-sm-6 - = render 'projects/runners/specific_runners' + = render 'projects/runners/project_runners' .col-sm-6 = render 'projects/runners/shared_runners' = render 'projects/runners/group_runners' diff --git a/app/views/shared/runners/_runner_type_alert.html.haml b/app/views/shared/runners/_runner_type_alert.html.haml index a1599b3ec4992f87223cd688cfbd4c96d3d580a2..63ecdaf4149781a0838588331530471ae4f3a7d2 100644 --- a/app/views/shared/runners/_runner_type_alert.html.haml +++ b/app/views/shared/runners/_runner_type_alert.html.haml @@ -12,5 +12,5 @@ title: s_('Runners|This runner is associated with specific projects.'), dismissible: false) do |c| = c.body do - = s_('Runners|You can set up a specific runner to be used by multiple projects but you cannot make this a shared or group runner.') - = link_to _('Learn more.'), help_page_path('ci/runners/runners_scope', anchor: 'specific-runners'), target: '_blank', rel: 'noopener noreferrer' + = s_('Runners|You can set up a project runner to be used by multiple projects but you cannot make this a shared or group runner.') + = link_to _('Learn more.'), help_page_path('ci/runners/runners_scope', anchor: 'project-runners'), target: '_blank', rel: 'noopener noreferrer' diff --git a/app/views/shared/runners/_runner_type_badge.html.haml b/app/views/shared/runners/_runner_type_badge.html.haml index c6a18c804da83b7f0eeac5f276e7f7c2782b301f..a8a93f3dd763b808c4acf1a3b29aa8196f8f059c 100644 --- a/app/views/shared/runners/_runner_type_badge.html.haml +++ b/app/views/shared/runners/_runner_type_badge.html.haml @@ -4,4 +4,4 @@ - elsif runner.group_type? = gl_badge_tag s_('Runners|group'), variant: :success - else - = gl_badge_tag s_('Runners|specific'), variant: :info + = gl_badge_tag s_('Runners|project'), variant: :info diff --git a/doc/api/runners.md b/doc/api/runners.md index 90b5a17f133a350ef7eaa4dac37754b67530330d..5593cb521134757142eaeec38d2cfb141d7bd6c6 100644 --- a/doc/api/runners.md +++ b/doc/api/runners.md @@ -33,7 +33,7 @@ GitLab and the runner are then connected. ## List owned runners -Get a list of specific runners available to the user. +Get a list of runners available to the user. ```plaintext GET /runners @@ -46,7 +46,7 @@ GET /runners?tag_list=tag1,tag2 | Attribute | Type | Required | Description | |------------|--------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `scope` | string | no | Deprecated: Use `type` or `status` instead. The scope of specific runners to return, one of: `active`, `paused`, `online` and `offline`; showing all runners if none provided | +| `scope` | string | no | Deprecated: Use `type` or `status` instead. The scope of runners to return, one of: `active`, `paused`, `online` and `offline`; showing all runners if none provided | | `type` | string | no | The type of runners to return, one of: `instance_type`, `group_type`, `project_type` | | `status` | string | no | The status of runners to return, one of: `online`, `offline`, `stale`, and `never_contacted`. `active` and `paused` are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0 | | `paused` | boolean | no | Whether to include only runners that are accepting or ignoring new jobs | @@ -97,7 +97,7 @@ Example response: ## List all runners **(FREE SELF)** -Get a list of all runners in the GitLab instance (specific and shared). Access +Get a list of all runners in the GitLab instance (project and shared). Access is restricted to users with administrator access. ```plaintext @@ -325,7 +325,7 @@ Example response: ### Pause a runner -Pause a specific runner. +Pause a runner. ```plaintext PUT --form "paused=true" /runners/:runner_id @@ -463,7 +463,7 @@ GET /projects/:id/runners?tag_list=tag1,tag2 | Attribute | Type | Required | Description | |------------|----------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) owned by the authenticated user | -| `scope` | string | no | Deprecated: Use `type` or `status` instead. The scope of specific runners to return, one of: `active`, `paused`, `online` and `offline`; showing all runners if none provided | +| `scope` | string | no | Deprecated: Use `type` or `status` instead. The scope of runners to return, one of: `active`, `paused`, `online` and `offline`; showing all runners if none provided | | `type` | string | no | The type of runners to return, one of: `instance_type`, `group_type`, `project_type` | | `status` | string | no | The status of runners to return, one of: `online`, `offline`, `stale`, and `never_contacted`. `active` and `paused` are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0 | | `paused` | boolean | no | Whether to include only runners that are accepting or ignoring new jobs | @@ -514,7 +514,7 @@ Example response: ## Enable a runner in project -Enable an available specific runner in the project. +Enable an available project runner in the project. ```plaintext POST /projects/:id/runners @@ -548,7 +548,7 @@ Example response: ## Disable a runner from project -Disable a specific runner from the project. It works only if the project isn't +Disable a project runner from the project. It works only if the project isn't the only project associated with the specified runner. If so, an error is returned. Use the call to [delete a runner](#delete-a-runner) instead. diff --git a/doc/ci/caching/index.md b/doc/ci/caching/index.md index c93d2b6a82a7e869e1981e5e112b84b5877d23d5..3f8c40a3abaa2707216c38a27d00663014ea147b 100644 --- a/doc/ci/caching/index.md +++ b/doc/ci/caching/index.md @@ -47,7 +47,7 @@ To ensure maximum availability of the cache, do one or more of the following: - [Tag your runners](../runners/configure_runners.md#use-tags-to-control-which-jobs-a-runner-can-run) and use the tag on jobs that share the cache. -- [Use runners that are only available to a particular project](../runners/runners_scope.md#prevent-a-specific-runner-from-being-enabled-for-other-projects). +- [Use runners that are only available to a particular project](../runners/runners_scope.md#prevent-a-project-runner-from-being-enabled-for-other-projects). - [Use a `key`](../yaml/index.md#cachekey) that fits your workflow. For example, you can configure a different cache for each branch. diff --git a/doc/ci/pipelines/cicd_minutes.md b/doc/ci/pipelines/cicd_minutes.md index e69c510291d476ce09d547ca64626a05137dd826..1a94c25317603d6153bdcccc2f58e1234b38782d 100644 --- a/doc/ci/pipelines/cicd_minutes.md +++ b/doc/ci/pipelines/cicd_minutes.md @@ -33,7 +33,7 @@ On self-managed GitLab instances: - Administrators can [assign more CI/CD minutes](#set-the-quota-of-cicd-minutes-for-a-specific-namespace) if a namespace uses all the CI/CD minutes in its monthly quota. -[Specific runners](../runners/runners_scope.md#specific-runners) are not subject to a quota of CI/CD minutes. +[Project runners](../runners/runners_scope.md#project-runners) are not subject to a quota of CI/CD minutes. ## Set the quota of CI/CD minutes for all namespaces @@ -216,9 +216,9 @@ The cost factors on self-managed instances are: #### Cost factor for community contributions to GitLab projects -Community contributors can use up to 300,000 minutes on shared runners when contributing to open source projects +Community contributors can use up to 300,000 minutes on shared runners when contributing to open source projects maintained by GitLab. The maximum of 300,000 minutes would only be possible if contributing exclusively to projects [part of the GitLab product](https://about.gitlab.com/handbook/engineering/metrics/#projects-that-are-part-of-the-product). The total number of minutes available on shared runners -is reduced by the CI/CD minutes used by pipelines from other projects. +is reduced by the CI/CD minutes used by pipelines from other projects. The 300,000 minutes applies to all SaaS tiers, and the cost factor calculation is: - `Monthly minute quota / 300,000 job duration minutes = Cost factor` diff --git a/doc/ci/runners/configure_runners.md b/doc/ci/runners/configure_runners.md index 28a856e3ddaf8477a2b3e5515d9a2c8894effe61..dc57e8f570fca7656196b3abf30fd7f46be4f4d4 100644 --- a/doc/ci/runners/configure_runners.md +++ b/doc/ci/runners/configure_runners.md @@ -28,7 +28,7 @@ On GitLab.com, you cannot override the job timeout for shared runners and must u To set the maximum job timeout: 1. In a project, go to **Settings > CI/CD > Runners**. -1. Select your specific runner to edit the settings. +1. Select your project runner to edit the settings. 1. Enter a value under **Maximum job timeout**. Must be 10 minutes or more. If not defined, the [project's job timeout setting](../pipelines/settings.md#set-a-limit-for-how-long-jobs-can-run) is used. @@ -89,7 +89,7 @@ To protect or unprotect a runner: 1. Check the **Protected** option. 1. Select **Save changes**. - + ### Forks @@ -150,7 +150,7 @@ the source of the HTTP requests it makes to GitLab when polling for jobs. The IP address is always kept up to date so if the runner IP changes it automatically updates in GitLab. -The IP address for shared runners and specific runners can be found in +The IP address for shared runners and project runners can be found in different places. ### Determine the IP address of a shared runner @@ -164,16 +164,16 @@ the GitLab instance. To determine this:  -### Determine the IP address of a specific runner +### Determine the IP address of a project runner -To can find the IP address of a runner for a specific project, +To can find the IP address of a runner for a project project, you must have the Owner role for the project. 1. Go to the project's **Settings > CI/CD** and expand the **Runners** section. 1. On the details page you should see a row for **IP Address**. - + ## Use tags to control which jobs a runner can run diff --git a/doc/ci/runners/img/specific_runner_ip_address.png b/doc/ci/runners/img/project_runner_ip_address.png similarity index 100% rename from doc/ci/runners/img/specific_runner_ip_address.png rename to doc/ci/runners/img/project_runner_ip_address.png diff --git a/doc/ci/runners/runners_scope.md b/doc/ci/runners/runners_scope.md index 6354a5198101a6130c7297e03fa3d285eceb497b..402478e81ba1bc04584eca0bb468e50c0639c498 100644 --- a/doc/ci/runners/runners_scope.md +++ b/doc/ci/runners/runners_scope.md @@ -11,8 +11,8 @@ Runners are available based on who you want to have access: - [Shared runners](#shared-runners) are available to all groups and projects in a GitLab instance. - [Group runners](#group-runners) are available to all projects and subgroups in a group. -- [Specific runners](#specific-runners) are associated with specific projects. - Typically, specific runners are used for one project at a time. +- [Project runners](#project-runners) are associated with specific projects. + Typically, project runners are used by one project at a time. ## Shared runners @@ -241,78 +241,78 @@ You must have the Owner role for the group. You must remove it from each project first. 1. On the confirmation dialog, select **OK**. -## Specific runners +## Project runners -Use _specific runners_ when you want to use runners for specific projects. For example, +Use _project runners_ when you want to use runners for specific projects. For example, when you have: - Jobs with specific requirements, like a deploy job that requires credentials. - Projects with a lot of CI activity that can benefit from being separate from other runners. -You can set up a specific runner to be used by multiple projects. Specific runners +You can set up a project runner to be used by multiple projects. Project runners must be enabled for each project explicitly. -Specific runners process jobs by using a first in, first out ([FIFO](https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics))) queue. +Project runners process jobs by using a first in, first out ([FIFO](https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics))) queue. NOTE: -Specific runners do not get shared with forked projects automatically. +Project runners do not get shared with forked projects automatically. A fork *does* copy the CI/CD settings of the cloned repository. -### Create a specific runner +### Create a project runner -You can create a specific runner for your self-managed GitLab instance or for GitLab.com. +You can create a project runner for your self-managed GitLab instance or for GitLab.com. Prerequisite: - You must have at least the Maintainer role for the project. -To create a specific runner: +To create a project runner: 1. [Install GitLab Runner](https://docs.gitlab.com/runner/install/). 1. On the top bar, select **Main menu > Projects** and find the project where you want to use the runner. 1. On the left sidebar, select **Settings > CI/CD**. 1. Expand **Runners**. -1. In the **Specific runners** section, note the URL and token. +1. In the **Project runners** section, note the URL and token. 1. [Register the runner](https://docs.gitlab.com/runner/register/). The runner is now enabled for the project. -### Enable a specific runner for a different project +### Enable a project runner for a different project -After a specific runner is created, you can enable it for other projects. +After a project runner is created, you can enable it for other projects. Prerequisites: You must have at least the Maintainer role for: - The project where the runner is already enabled. - The project where you want to enable the runner. -- The specific runner must not be [locked](#prevent-a-specific-runner-from-being-enabled-for-other-projects). +- The project runner must not be [locked](#prevent-a-project-runner-from-being-enabled-for-other-projects). -To enable a specific runner for a project: +To enable a project runner for a project: 1. On the top bar, select **Main menu > Projects** and find the project where you want to enable the runner. 1. On the left sidebar, select **Settings > CI/CD**. 1. Expand **Runners**. -1. In the **Specific runners** area, by the runner you want, select **Enable for this project**. +1. In the **Project runners** area, by the runner you want, select **Enable for this project**. -You can edit a specific runner from any of the projects it's enabled for. +You can edit a project runner from any of the projects it's enabled for. The modifications, which include unlocking and editing tags and the description, affect all projects that use the runner. -An administrator can [enable the runner for multiple projects](../../user/admin_area/settings/continuous_integration.md#enable-a-specific-runner-for-multiple-projects). +An administrator can [enable the runner for multiple projects](../../user/admin_area/settings/continuous_integration.md#enable-a-project-runner-for-multiple-projects). -### Prevent a specific runner from being enabled for other projects +### Prevent a project runner from being enabled for other projects -You can configure a specific runner so it is "locked" and cannot be enabled for other projects. +You can configure a project runner so it is "locked" and cannot be enabled for other projects. This setting can be enabled when you first [register a runner](https://docs.gitlab.com/runner/register/), but can also be changed later. -To lock or unlock a specific runner: +To lock or unlock a project runner: 1. On the top bar, select **Main menu > Projects** and find the project where you want to enable the runner. 1. On the left sidebar, select **Settings > CI/CD**. 1. Expand **Runners**. -1. Find the specific runner you want to lock or unlock. Make sure it's enabled. You cannot lock shared or group runners. +1. Find the project runner you want to lock or unlock. Make sure it's enabled. You cannot lock shared or group runners. 1. Select **Edit** (**{pencil}**). 1. Select the **Lock to current projects** checkbox. 1. Select **Save changes**. diff --git a/doc/development/cicd/index.md b/doc/development/cicd/index.md index 2a60ca18169e699e5e180bd5661bccbc29d3c7d8..641d0ea4f6f8815e0a40a4b40e9e69fb7b62d239 100644 --- a/doc/development/cicd/index.md +++ b/doc/development/cicd/index.md @@ -69,7 +69,7 @@ looks for the next jobs to be transitioned towards completion. While doing that, updates the status of jobs, stages and the overall pipeline. On the right side of the diagram we have a list of [runners](../../ci/runners/index.md) -connected to the GitLab instance. These can be shared runners, group runners, or project-specific runners. +connected to the GitLab instance. These can be shared runners, group runners, or project runners. The communication between runners and the Rails server occurs through a set of API endpoints, grouped as the `Runner API Gateway`. @@ -131,7 +131,7 @@ After the runner is [registered](https://docs.gitlab.com/runner/register/) using - The type of runner it is registered as: - a shared runner - a group runner - - a project specific runner + - a project runner - Any associated tags. The runner initiates the communication by requesting jobs to execute with `POST /api/v4/jobs/request`. Although polling happens every few seconds, we leverage caching through HTTP headers to reduce the server-side work load if the job queue doesn't change. diff --git a/doc/development/documentation/styleguide/index.md b/doc/development/documentation/styleguide/index.md index 921bb13721b6f658efcbeaca2325fa26d03a74f2..bc38909acf445ec142986edd66876c25dd669e40 100644 --- a/doc/development/documentation/styleguide/index.md +++ b/doc/development/documentation/styleguide/index.md @@ -320,7 +320,7 @@ You can use these fake tokens as examples: | Application ID | `2fcb195768c39e9a94cec2c2e32c59c0aad7a3365c10892e8116b5d83d4096b6` | | Application secret | `04f294d1eaca42b8692017b426d53bbc8fe75f827734f0260710b83a556082df` | | CI/CD variable | `Li8j-mLUVA3eZYjPfd_H` | -| Specific runner token | `yrnZW46BrtBFqM7xDzE7dddd` | +| Project runner token | `yrnZW46BrtBFqM7xDzE7dddd` | | Shared runner token | `6Vk7ZsosqQyfreAxXTZr` | | Trigger token | `be20d8dcc028677c931e04f3871a9b` | | Webhook secret token | `6XhDroRcYPM5by_h-HLY` | diff --git a/doc/topics/autodevops/requirements.md b/doc/topics/autodevops/requirements.md index f5e06843e60c5c2cc115503228a171ef51ebfda4..aa9627c1247aedb9dfb3807494fa23f46d6e1d7b 100644 --- a/doc/topics/autodevops/requirements.md +++ b/doc/topics/autodevops/requirements.md @@ -139,7 +139,7 @@ To make full use of Auto DevOps with Kubernetes, you need: [Docker Machine](https://docs.gitlab.com/runner/executors/docker_machine.html). Runners should be registered as [shared runners](../../ci/runners/runners_scope.md#shared-runners) - for the entire GitLab instance, or [specific runners](../../ci/runners/runners_scope.md#specific-runners) + for the entire GitLab instance, or [project runners](../../ci/runners/runners_scope.md#project-runners) that are assigned to specific projects. - **Prometheus** (for [Auto Monitoring](stages.md#auto-monitoring)) diff --git a/doc/user/admin_area/settings/continuous_integration.md b/doc/user/admin_area/settings/continuous_integration.md index 7c869c9b8fe91095a671dfdd58830ce9991cbf74..aca3509e5ca99fd0c8b41137b31f7fb269dfcecc 100644 --- a/doc/user/admin_area/settings/continuous_integration.md +++ b/doc/user/admin_area/settings/continuous_integration.md @@ -44,12 +44,12 @@ Any time a new project is created, the shared runners are available. As an administrator you can set either a global or namespace-specific limit on the number of [CI/CD minutes](../../../ci/pipelines/cicd_minutes.md) you can use. -## Enable a specific runner for multiple projects +## Enable a project runner for multiple projects -If you have already registered a [specific runner](../../../ci/runners/runners_scope.md#specific-runners) +If you have already registered a [project runner](../../../ci/runners/runners_scope.md#project-runners) you can assign that runner to other projects. -To enable a specific runner for more than one project: +To enable a project runner for more than one project: 1. On the top bar, select **Main menu > Admin**. 1. From the left sidebar, select **CI/CD > Runners**. diff --git a/doc/user/permissions.md b/doc/user/permissions.md index 8455db450302dfbc7562390a4504e0a6240aa4bc..90fa4322be5f99680ceff56cbe00061b11d9433c 100644 --- a/doc/user/permissions.md +++ b/doc/user/permissions.md @@ -222,8 +222,8 @@ The following table lists project permissions available for each role: 1. On self-managed GitLab instances, guest users are able to perform this action only on public and internal projects (not on private projects). [External users](admin_area/external_users.md) - must be given explicit access even if the project is internal. Users with the Guest role on GitLab.com are - only able to perform this action on public projects because internal visibility is not available. + must be given explicit access even if the project is internal. Users with the Guest role on GitLab.com are + only able to perform this action on public projects because internal visibility is not available. 2. Guest users can only view the [confidential issues](project/issues/confidential_issues.md) they created themselves or are assigned to. 3. Not allowed for Guest, Reporter, Developer, Maintainer, or Owner. See [protected branches](project/protected_branches.md). 4. If the [branch is protected](project/protected_branches.md), this depends on the access given to Developers and Maintainers. @@ -287,7 +287,7 @@ More details about the permissions for some project-level features follow. | View a job with [debug logging](../ci/variables/index.md#enable-debug-logging) | | | | ✓ | ✓ | ✓ | | Use pipeline editor | | | | ✓ | ✓ | ✓ | | Run [interactive web terminals](../ci/interactive_web_terminal/index.md) | | | | ✓ | ✓ | ✓ | -| Add specific runners to project | | | | | ✓ | ✓ | +| Add project runners to project | | | | | ✓ | ✓ | | Clear runner caches manually | | | | | ✓ | ✓ | | Enable shared runners in project | | | | | ✓ | ✓ | | Manage CI/CD settings | | | | | ✓ | ✓ | diff --git a/lib/api/ci/runners.rb b/lib/api/ci/runners.rb index 4a6c58b498790382ac59bdd31397829f9a3ed5f1..f2f0f32261af05c09bc7468a9423b84f8bd4971b 100644 --- a/lib/api/ci/runners.rb +++ b/lib/api/ci/runners.rb @@ -13,7 +13,7 @@ class Runners < ::API::Base helpers do params :deprecated_filter_params do optional :scope, type: String, values: ::Ci::Runner::AVAILABLE_SCOPES, - desc: 'Deprecated: Use `type` or `status` instead. The scope of specific runners to return' + desc: 'Deprecated: Use `type` or `status` instead. The scope of runners to return' end params :filter_params do @@ -111,9 +111,9 @@ def authenticate_list_runners_jobs!(runner) present paginate(runners), with: Entities::Ci::Runner end - desc 'Get all runners - shared and specific' do + desc 'Get all runners - shared and project' do summary 'List all runners' - detail 'Get a list of all runners in the GitLab instance (specific and shared). ' \ + detail 'Get a list of all runners in the GitLab instance (shared and project). ' \ 'Access is restricted to users with administrator access.' success Entities::Ci::Runner failure [[400, 'Scope contains invalid value'], [401, 'Unauthorized']] @@ -286,7 +286,7 @@ def authenticate_list_runners_jobs!(runner) end desc 'Enable a runner in project' do - detail "Enable an available specific runner in the project." + detail "Enable an available project runner in the project." success Entities::Ci::Runner failure [[400, 'Bad Request'], [403, 'No access granted'], [403, 'Runner is a group runner'], [403, 'Runner is locked'], @@ -308,7 +308,7 @@ def authenticate_list_runners_jobs!(runner) end desc "Disable project's runner" do - summary "Disable a specific runner from the project" + summary "Disable a project runner from the project" detail "It works only if the project isn't the only project associated with the specified runner. " \ "If so, an error is returned. Use the call to delete a runner instead." success Entities::Ci::Runner diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 3400c8163529ca90ce246aa748facb9fcc3ca7d1..142d05e2cb913873572b453dd3014d56d4f8fef6 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -5980,9 +5980,6 @@ msgstr "" msgid "Available on-demand" msgstr "" -msgid "Available specific runners" -msgstr "" - msgid "Avatar for %{assigneeName}" msgstr "" @@ -36257,6 +36254,9 @@ msgstr "" msgid "Runners|Assigned Projects (%{projectCount})" msgstr "" +msgid "Runners|Assigned project runners" +msgstr "" + msgid "Runners|Associated with one or more projects" msgstr "" @@ -36468,6 +36468,9 @@ msgstr "" msgid "Runners|Project" msgstr "" +msgid "Runners|Project runners" +msgstr "" + msgid "Runners|Property Name" msgstr "" @@ -36648,6 +36651,9 @@ msgstr "" msgid "Runners|The runner will be permanently deleted and no longer available for projects or groups in the instance. Are you sure you want to continue?" msgstr "" +msgid "Runners|These runners are assigned to this project." +msgstr "" + msgid "Runners|This group currently has 1 stale runner." msgid_plural "Runners|This group currently has %d stale runners." msgstr[0] "" @@ -36737,7 +36743,7 @@ msgstr "" msgid "Runners|Yes, start deleting stale runners" msgstr "" -msgid "Runners|You can set up a specific runner to be used by multiple projects but you cannot make this a shared or group runner." +msgid "Runners|You can set up a project runner to be used by multiple projects but you cannot make this a shared or group runner." msgstr "" msgid "Runners|You have used %{quotaUsed} out of %{quotaLimit} of your shared Runners pipeline minutes." @@ -36752,10 +36758,10 @@ msgstr "" msgid "Runners|paused" msgstr "" -msgid "Runners|shared" +msgid "Runners|project" msgstr "" -msgid "Runners|specific" +msgid "Runners|shared" msgstr "" msgid "Runner|Owner" @@ -40177,9 +40183,6 @@ msgstr "" msgid "Spam log successfully submitted as ham." msgstr "" -msgid "Specific runners" -msgstr "" - msgid "Specified URL cannot be used: \"%{reason}\"" msgstr "" @@ -42794,9 +42797,6 @@ msgstr "" msgid "These runners are shared across projects in this group." msgstr "" -msgid "These runners are specific to this project." -msgstr "" - msgid "These variables are inherited from the parent group." msgstr "" diff --git a/spec/features/admin/admin_runners_spec.rb b/spec/features/admin/admin_runners_spec.rb index 30fd04b1c3e4d1132f1a0e676a60db6a89378ee1..648ccb60a9d50a1ee9f90c1d86f938cfd9a394ec 100644 --- a/spec/features/admin/admin_runners_spec.rb +++ b/spec/features/admin/admin_runners_spec.rb @@ -644,7 +644,7 @@ visit edit_admin_runner_path(runner) end - it 'removed specific runner from project' do + it 'removed project runner from project' do within '[data-testid="assigned-projects"]' do click_on 'Disable' end diff --git a/spec/features/runners_spec.rb b/spec/features/runners_spec.rb index e7c2452af93139d2dfb790c6b770f632505e319f..b2ddf427c0ddbce6aaf14e882c6db4ba5fcbc9b9 100644 --- a/spec/features/runners_spec.rb +++ b/spec/features/runners_spec.rb @@ -64,10 +64,10 @@ context 'when a project_type runner is activated on the project' do let_it_be(:project_runner) { create(:ci_runner, :project, projects: [project]) } - it 'user sees the specific runner' do + it 'user sees the project runner' do visit project_runners_path(project) - within '.activated-specific-runners' do + within '[data-testid="assigned_project_runners"]' do expect(page).to have_content(project_runner.display_name) end @@ -76,30 +76,30 @@ expect(page).to have_content(project_runner.platform) end - it 'user can pause and resume the specific runner' do + it 'user can pause and resume the project runner' do visit project_runners_path(project) - within '.activated-specific-runners' do + within '[data-testid="assigned_project_runners"]' do expect(page).to have_link('Pause') end click_on 'Pause' - within '.activated-specific-runners' do + within '[data-testid="assigned_project_runners"]' do expect(page).to have_link('Resume') end click_on 'Resume' - within '.activated-specific-runners' do + within '[data-testid="assigned_project_runners"]' do expect(page).to have_link('Pause') end end - it 'user removes an activated specific runner if this is last project for that runners' do + it 'user removes an activated project runner if this is last project for that runners' do visit project_runners_path(project) - within '.activated-specific-runners' do + within '[data-testid="assigned_project_runners"]' do click_on 'Remove runner' end @@ -109,7 +109,7 @@ it 'user edits the runner to be protected' do visit project_runners_path(project) - within '.activated-specific-runners' do + within '[data-testid="assigned_project_runners"]' do first('[data-testid="edit-runner-link"]').click end @@ -129,7 +129,7 @@ it 'user edits runner not to run untagged jobs' do visit project_runners_path(project) - within '.activated-specific-runners' do + within '[data-testid="assigned_project_runners"]' do first('[data-testid="edit-runner-link"]').click end @@ -189,7 +189,7 @@ end end - context 'when a specific runner exists in another project' do + context 'when a project runner exists in another project' do let(:another_project) { create(:project) } let!(:project_runner) { create(:ci_runner, :project, projects: [another_project]) } @@ -197,20 +197,20 @@ another_project.add_maintainer(user) end - it 'user enables and disables a specific runner' do + it 'user enables and disables a project runner' do visit project_runners_path(project) - within '.available-specific-runners' do + within '[data-testid="available_project_runners"]' do click_on 'Enable for this project' end - expect(page.find('.activated-specific-runners')).to have_content(project_runner.display_name) + expect(page.find('[data-testid="assigned_project_runners"]')).to have_content(project_runner.display_name) - within '.activated-specific-runners' do + within '[data-testid="assigned_project_runners"]' do click_on 'Disable for this project' end - expect(page.find('.available-specific-runners')).to have_content(project_runner.display_name) + expect(page.find('[data-testid="available_project_runners"]')).to have_content(project_runner.display_name) end end diff --git a/spec/support/rspec_order_todo.yml b/spec/support/rspec_order_todo.yml index ea918cb3437891d60b8972c21fa53ecae7523c82..6cba933234753406554416ef72ff9e605cab9197 100644 --- a/spec/support/rspec_order_todo.yml +++ b/spec/support/rspec_order_todo.yml @@ -10308,7 +10308,6 @@ - './spec/views/projects/pipeline_schedules/_pipeline_schedule.html.haml_spec.rb' - './spec/views/projects/pipelines/show.html.haml_spec.rb' - './spec/views/projects/project_members/index.html.haml_spec.rb' -- './spec/views/projects/runners/_specific_runners.html.haml_spec.rb' - './spec/views/projects/settings/ci_cd/_autodevops_form.html.haml_spec.rb' - './spec/views/projects/settings/integrations/edit.html.haml_spec.rb' - './spec/views/projects/settings/operations/show.html.haml_spec.rb' diff --git a/spec/views/projects/runners/_specific_runners.html.haml_spec.rb b/spec/views/projects/runners/_project_runners.html.haml_spec.rb similarity index 80% rename from spec/views/projects/runners/_specific_runners.html.haml_spec.rb rename to spec/views/projects/runners/_project_runners.html.haml_spec.rb index ce16e0d5ac685ff78217974ce6ee9337c0a9743b..8a7e693bdeb020784af5c7d6e22168513c0a4ec3 100644 --- a/spec/views/projects/runners/_specific_runners.html.haml_spec.rb +++ b/spec/views/projects/runners/_project_runners.html.haml_spec.rb @@ -2,10 +2,10 @@ require 'spec_helper' -RSpec.describe 'projects/runners/specific_runners.html.haml' do +RSpec.describe 'projects/runners/_project_runners.html.haml', feature_category: :runner do describe 'render' do - let_it_be(:user) { create(:user) } - let_it_be(:project) { create(:project) } + let_it_be(:user) { build(:user) } + let_it_be(:project) { build(:project) } before do @project = project @@ -22,7 +22,7 @@ end it 'enables the Remove project button for a project' do - render 'projects/runners/specific_runners', project: project + render 'projects/runners/project_runners', project: project expect(rendered).to have_selector '#js-install-runner' expect(rendered).not_to have_content 'Please contact an admin to register runners.' @@ -35,7 +35,7 @@ end it 'does not enable the Remove project button for a project' do - render 'projects/runners/specific_runners', project: project + render 'projects/runners/project_runners', project: project expect(rendered).to have_content 'Please contact an admin to register runners.' expect(rendered).not_to have_selector '#js-install-runner' diff --git a/spec/views/shared/runners/_runner_details.html.haml_spec.rb b/spec/views/shared/runners/_runner_details.html.haml_spec.rb index 978750c8435b06e58b425dff39b00ccc44e7ac87..6e95f6e8075cf4b0f5ddf00d33a65e191cddf9ab 100644 --- a/spec/views/shared/runners/_runner_details.html.haml_spec.rb +++ b/spec/views/shared/runners/_runner_details.html.haml_spec.rb @@ -46,7 +46,7 @@ context 'when runner is of type project' do let(:runner) { create(:ci_runner, :project) } - it { is_expected.to have_content("Runner ##{runner.id} specific") } + it { is_expected.to have_content("Runner ##{runner.id} project") } end end