Skip to content

Improve the output of registration command

Tomasz Maczukin requested to merge improve-registration-command-output into main

What does this MR do?

Improves the output of registration command by printing the path to the configuration file (and mentioning that the authentication token was saved there).

Why was this MR needed?

While through https://gitlab.com/gitlab-org/gitlab-runner/-/issues/28915 we're working on redesigning the runner creation model and dropping registration concept at all, we will still need to live with gitlab-runner register for a while.

Two often confusing things related to this are:

  • Difference between registration token and authentication token. In fact, many users don't know that an authentication token is ever created and used to communicate with GitLab and when asked (by team members, by tooling, by documentation) to "put the token in Runner's config.toml" - the registration token is added there, which obviously will not work.
  • Existence of the config.toml file or rather knowledge, that gitlab-runner register is adding some changes there.

A recent Slack discussion with our own team members where exactly that problem showed up 👉 https://gitlab.slack.com/archives/CBQ76ND6W/p1655471174290749

With this change, the registration command, if succeeded, will print information about saving the configuration and the authentication token and will print the path to the configuration file that was used.

What's the best way to test this MR?

What are the relevant issue numbers?

Edited by Tomasz Maczukin

Merge request reports