Improve the output of registration command
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, thatgitlab-runner register
is adding some changes there.
A recent Slack discussion with our own team members where exactly that problem showed up
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.