Ignore forbidden arguments to register if using --registration-token
What does this MR do?
This MR changes the register
command slightly so that passing forbidden arguments to it when using a new glrt-
token only issues a warning instead of a fatal error when the token is passed through --registration-token
. The fatal error is still displayed if using the --token
argument.
Why was this MR needed?
See gitlab#387993 (comment 1433301853)
What's the best way to test this MR?
gitlab-runner register --url https://gitlab.com --registration-token glrt-xzw5Xck7wjxjKBCP5-Mg --executor shell --tag-list shell --non-interactive
I didn't implement tests for this change since it would require non-trivial changes to testRegisterCommandRun
and all the tests using it, in the end for something that is going away, meaning we would need to undo those changes in a near future. If you prefer to have coverage for this anyway, let me know and I'll add the coverage.
What are the relevant issue numbers?
Edited by Pedro Pombeiro