GitLab Runner: non-interactive registration does not save all values in config.toml file
Description
You may experience difficulty when setting up a GitLab Runner using non-interactive registration. The expected behavior is that the supplied parameters will be saved in the config.toml
file but you may find that not all values are saved. This commonly occurs when registering a running which includes runner cache
configuration but can occur in other scenarios.
Impacted offerings:
- GitLab.com
- GitLab Dedicated
- GitLab Self-Managed
Resolution
Boolean parameters must be passed in the command line using an equals sign (=
).
For example: --key={true|false}
.
Cause
If boolean parameters are passed with a space, such as --key {true|false}
, any parameters that follow after this may not be processed properly. This is a limitation of the underlying library used to parse the parameters.
Symptom
When running the gitlab-runner register
command, the following output can be seen:
WARN[0000] boolean parameters must be passed in the command line with --cache-shared=true
WARN[0000] parameters after this may be ignored