Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only first Docker volume added to runner configuration #19

Closed
joelpet opened this issue Aug 6, 2018 · 1 comment
Closed

Only first Docker volume added to runner configuration #19

joelpet opened this issue Aug 6, 2018 · 1 comment

Comments

@joelpet
Copy link
Contributor

joelpet commented Aug 6, 2018

The following vars definition

gitlab_runner_docker_volumes:                  
  - "/cache"                                   
  - "/tmp"

results in a registration command like this:

gitlab-runner register ... --docker-volumes "/cache" "/tmp" ...

which does not seem to have the expected result—i.e. only /cache is being added as a volume in /etc/gitlab-runner/config.toml instead of both /cache and /tmp.

With the following code in place at

{% if gitlab_runner_docker_volumes is defined %}
it works as expected (both volumes show up in config.toml):

    {% for volume in gitlab_runner_docker_volumes | default([]) %}
    --docker-volumes "{{ volume }}"
    {% endfor %}

$ gitlab-runner --version
Version:      11.1.0
Git revision: 081978aa
Git branch:   
GO version:   go1.8.7
Built:        2018-07-22T07:24:46+00:00
OS/Arch:      linux/amd64
@riemers
Copy link
Owner

riemers commented Aug 6, 2018

Can you make a pull request for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants