Remove support for --docker-services flag on register command
Overview
In !1673 (merged) we introduced a new config structure for Docker services, and in #4922 (closed) we are removing support for the old structure. With this removal of the old structure --docker-services
will also be removed. Meaning if you have gitlab-runner register --docker-services postgres
it will no longer set the service. This is because the configuration is not longer an array for strings, but it's an array of structs and continues to have support for this flag will be confusing which field you are setting.
We've discussed this in detail in !1776 (comment 274656137)
Migration
If you have any automation around this, the best way to migrate away from this is to use configuration templates where you define the services in the template and use it, for example:
cat > /tmp/test-config.template.toml << EOF
[[runners]]
[runners.docker]
[[runners.docker.services]]
name = "postgres"
EOF
sudo gitlab-runner register \
--template-config /tmp/test-config.template.toml \
--non-interactive \
--url https://gitlab.com \
--registration-token __REDACTED__ \
--name test-runner \
--docker-image alpine:3.11
--executor docker \