Skip to content

Project specific runner registration control for admins

What does this MR do and why?

This MR expands on admin runner registration management by allowing admins to restrict project runner registration on a project by project basis. In prior, it was only specifiable on an ‘all project’ basis under the admin settings, CI/CD page.

The new setting ‘runner_registration_enabled’ is held as a boolean column in the project_settings table. By default, it is enabled.

When ‘all project’ runner registration is disabled, all projects have disabled runner registration regardless of project by project specifications set.

When ‘all project’ runner registration is enabled, runner registration is permitted based on the project's runner_registration_enabled setting and all of the parent groups` ‘runner_registration_enabled’ setting. Disabling a parent group disables runner registration for the projects it contains.

As before, the admin account will always be able to register project runners.

Related MRs: Group by Group Setting

Screenshots or screen recordings

The following admin settings project edit page is where admins can toggle runner registration. image

When the project can register runners or when the user is an admin, the project runner registration ui will look like the following: image

When the project cannot register runners and the user is not an admin, the project runner registration ui will look like the following: image

How to set up and validate locally

  1. Visit the admin settings, CI/CD page and verify that under Runner Registration, “Members of the group can register runners” is checked. http://gdk.test:3000/admin/application_settings/ci_cd

  2. Visit the admin page and navigate to the projects list http://gdk.test:3000/admin/projects

  3. Select edit for <project_name> so that you are on the following form http://gdk.test:3000/admin/projects/<project_name>/edit

  4. Under the "Permissions and project features" section, modify the “Runner registration” checkbox and save changes.

  5. Log in as a member of the modified project

  6. Navigate to the <project_name> CI/CD settings page and verify that the runner registration token is visible/invisible as specified. http://gdk.test:3000/groups/<group_name>/-/runners

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Markus Ferrell

Merge request reports

Loading