Skip to content

Allow admins to limit registration of project and group runners [RUN ALL RSPEC] [RUN AS-IF-FOSS]

Thomas Watts requested to merge (removed):runner-registrars into master

This MR addresses a desire for admins to be able to limit the registration of project and group runners.

A section has been added to Admin Area > Settings > CI/CD: Screen_Shot_2021-05-05_at_7.00.10_PM After selecting the desired options (in this case, neither group nor project), the following changes will occur:

  1. Visiting the group CI/CD Settings page will change the view from Screen_Shot_2021-05-05_at_6.58.55_PM to Screen_Shot_2021-05-05_at_7.00.30_PM to

  2. Visiting the project CI/CD Settings page will change the view from Screen_Shot_2021-05-05_at_6.59.41_PM to Screen_Shot_2021-05-05_at_7.01.04_PM

  3. the API at POST runners/ will return a 403 Forbidden error

This may relate to the following issues:

DB migrations

Linked issues

#202164 (closed)

UP

be rake db:migrate:up VERSION="20210317210338"
== 20210317210338 AddValidRunnerRegistrars: migrating =========================
-- add_column(:application_settings, :valid_runner_registrars, :string, {:array=>true, :default=>["project", "group"]})
   -> 0.0052s
== 20210317210338 AddValidRunnerRegistrars: migrated (0.0053s) ================

DOWN

be rake db:migrate:down VERSION="20210317210338"
== 20210317210338 AddValidRunnerRegistrars: reverting =========================
-- remove_column(:application_settings, :valid_runner_registrars, :string, {:array=>true, :default=>["project", "group"]})
   -> 0.0035s
== 20210317210338 AddValidRunnerRegistrars: reverted (0.0080s) ================
Edited by Darren Eastman

Merge request reports