Skip to content

MachineOptions flag does not add all options to config.toml file

Summary

MachineOptions flag doe not add all options to config.toml file

Steps to reproduce

Run this command:

docker run -it --rm --name runner \
      -v $PWD/config.toml:/etc/gitlab-runner/config.toml \
      -v $PWD/certs:/etc/gitlab-runner/certs \
      gitlab/gitlab-runner:v9.2.0 --debug register \
      --non-interactive \
      -u https://<gitlab url> \
      -r <token> \
      --name autoscaling-dind \
      --tag-list autoscale.dind \
      --output-limit "40960" \
      --docker-privileged \
      --executor docker+machine \
      --docker-image docker:latest \
      --machine-machine-driver amazonec2 \
      --machine-machine-name auto-scale-%s \
      --machine-machine-options amazonec2-use-private-address \
      --machine-machine-options amazonec2-access-key=xxxxxxxxxxxxxxx \
      --machine-machine-options amazonec2-secret-key=xxxxxxxxxxxxxxx \
      --machine-machine-options amazonec2-instance-type=t2.micro \
      --machine-machine-options amazonec2-tags=Name,gitlab-runner-as \
      --machine-machine-options amazonec2-request-spot-instance \
      --machine-machine-options amazonec2-ssh-keypath=/etc/gitlab-runner/certs/autoscale

Run the docker command above, then cat the config.toml file.

Actual behavior

leaves some of the machine options out

Expected behavior

All the specified options should be in the config.toml file

Used GitLab Runner version

alpine-v9.2.0 & v9.2.0
Version:      9.2.0
Git revision: adfc387
Git branch:   9-2-stable
GO version:   go1.7.5
Built:        Mon, 22 May 2017 16:00:24 +0000
OS/Arch:      linux/amd64
Edited by Tomasz Maczukin