Skip to content

Add runner registration instructions (2)

What does this MR do and why?

This change adds specific registration instructions for each platform according to the user's selection during runner creation.

This is a large MR!

This MR includes over 700 lines 😱 however it is only new static page, so it's UX is quick to review, you'll see the entire change in a single place. I'll leave some extra comments so reviewing is easier 🙇

This is a summary of the changes:

  • We are working behind the create_runner_workflow feature flag.
  • Adds a new mounting point for our page at #js-admin-register-runner (a bit of boilerplate)
  • Adds a new app component with an Apollo query in it (so a bit more bolierplate)
  • Renders instructions for different platforms, with a helper cli_command component

Related MRs

Add CreateRunner Mutation Endpoint (!110593 - merged)
Call API to create runner (1) (!111789 - merged)
Add runner registration instructions (2) (!112487 - merged) 👈 you are here
Add installation command for drawer (3) (!112561 - merged)

Screenshots or screen recordings

image
2023-02-23_13.04.50

UI notes

After a discussion over Slack at https://gitlab.slack.com/archives/C0199KBMY59/p1676910832818489 (internal) I used user-select: none; in part of the command to allow the user to have their command in a single line, so it behaves like the copy button:

This allows us to avoid using line breaks in the command.

The command prompt (e.g. $) is also ignored when copying.

How to set up and validate locally

  1. Enable the feature flag: in your console rails c, and then Feature.enable(:create_runner_workflow)
  2. Visit Admin -> CI/CD -> Runners
  3. Select the "New instance runner" button
  4. Input values to create a new runner, select a platform you want.
  5. After "submit", confirm the success message
  6. In the runner list a "Never connected" runner will appear.

MR acceptance checklist

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

Related to #383139 (closed)

Edited by Ali Ndlovu

Merge request reports

Loading