Skip to content

Add installation command for drawer (3)

Miguel Rincon requested to merge 383139-installation-drawer into master

What does this MR do and why?

This change adds a drawer with commands to install GitLab Runner in the users machine.

This MR is large, but there is large portion of snapshots (~200 LOC) that I am using to keep the commands from changing arbitrarily.

How does this MR work?

I have taken the scripts we loaded from the backend via GraphQL and moved them to the frontend. This is part of the deprecation of our APIs to generate installation scripts: #387937

The scripts are shown on the screen according to the user selection, this requires some updates to our webpack config.

UI change

In #383139 (closed) we use a different look and feel for our scripts:

original design implementation
image image

I did this for 2 main reasons:

  • Our scripts can contain an arbitrary number of steps depending on the platform
  • The proposed design had users copy commands one-by-one but not all steps are mandatory. Some steps are suggestions and users are expected to discern if/how to execute them.

Related MRs

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

Screenshots or screen recordings

2023-03-02_09.50.22

How to set up and validate locally

  1. Enable the feature flag: in your console rails c, and then Feature.enable(:create_runner_workflow_for_admin)
  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. Confirm the installations instructions are correct for all platforms and they update according to the selection

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 Miguel Rincon

Merge request reports