gitlab-runner cli | --env does not work
Summary
If i use the --env
option of the gitlab-runner register
cli the env options are not registered in the executed docker images.
Steps to reproduce
Register the runner with and start it.
gitlab-runner register \
--executor 'docker' \
--docker-image 'alpine' \
--docker-network-mode $DOCKER_NETWORK \
--pre-clone-script 'git config --global http.sslVerify false;' \
--docker-disable-cache \
--docker-wait-for-services-timeout "30" \
--docker-volumes "/var/run/docker.sock:/var/run/docker.sock" \
--docker-pull-policy "always" \
--docker-tlsverify "false" \
--env "GIT_SSL_NO_VERIFY=1" \
--env "HTTP_PROXY=$HTTP_PROXY" \
--env "HTTPS_PROXY=$HTTPS_PROXY" \
--env "NO_PROXY=$NO_PROXY"
...
Used env variables are all set locally.
Actual behavior
Runner Debug Output
runners:
- name: Runner
...
runnersettings:
executor: docker
buildsdir: ""
cachedir: ""
environment: []
preclonescript: git config --global http.sslVerify false;
prebuildscript: ""
postbuildscript: ""
Expected behavior
Runner Debug Output
runners:
- name: Runner
...
runnersettings:
executor: docker
buildsdir: ""
cachedir: ""
environment: [GIT_SSL_NO_VERIFY=1, HTTP_PROXY=1..., HTTPS_PROXY=1..., NO_PROXY=...]
preclonescript: git config --global http.sslVerify false;
prebuildscript: ""
postbuildscript: ""
Environment description
GitLab: 9.1.2
(latest)
Runner: gitlab/gitlab-runner:alpine-v9.1.1
(latest)