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

CI Runner options #117

Closed
cdenneen opened this issue Feb 16, 2017 · 2 comments
Closed

CI Runner options #117

cdenneen opened this issue Feb 16, 2017 · 2 comments

Comments

@cdenneen
Copy link

@tobru I know you setup the cirunner code but I think I'm missing on how to add a part to the runners.docker section for adding extra_hosts option... (https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/1036)

[[runners]]
  name = "ruby2.3"
  url = "https://gitlab.host/ci"
  token = "XXX"
  executor = "docker"
  [runners.docker]
    tls_verify = false
    image = "ruby:2.3"
    privileged = false
    disable_cache = false
    volumes = ["/cache"]
  [runners.cache]

needs to be:

[[runners]]
  name = "ruby2.3"
  url = "https://gitlab.host/ci"
  token = "XXXXX"
  executor = "docker"
  [runners.docker]
    tls_verify = false
    image = "ruby:2.3"
    privileged = false
    disable_cache = false
    volumes = ["/cache"]
    extra_hosts = ["gitlab.host:10.1.10.10"]
  [runners.cache]

How can I update my config hash:

I've tried the following:

gitlab_ci_runners_defaults:
  url: "https://gitlab.host/ci"
  registration-token: "XXXXX"
  executor: "docker"
  docker-image: "ubuntu:trusty"
  "[runners.docker]":
    extra_hosts:
      - "gitlab.host:10.1.10.10"

and

gitlab_ci_runners_defaults:
  url: "https://gitlab.host/ci"
  registration-token: "XXXXX"
  executor: "docker"
  docker-image: "ubuntu:trusty"
  extra_hosts:
    - "gitlab.host:10.1.10.10"

Neither seems to add the extra_hosts anywhere

Also tried here with no luck as well:

gitlab_ci_runners:
  ruby2.3:
    docker-image: "ruby:2.3"
    extra_hosts:
      - "gitlab.host:10.1.10.10"
@cdenneen
Copy link
Author

Found the solution:

gitlab_ci_runners_defaults:
...
  docker-volumes:
    - "/shared_data:/shared_data"
  docker-extra-hosts:
      - "gitlab.host:10.1.10.10"

@mjburling
Copy link

This was really helpful to me. Thanks for coming back and providing a solution, @cdenneen

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