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

The builds_dir parameter puts the builds_dir option in the wrong place in config.toml #51

Open
EdgeJ opened this issue Jun 20, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@EdgeJ
Copy link

EdgeJ commented Jun 20, 2019

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.4.2
  • Ruby: 2.5.3
  • Distribution: CentOS 6.10
  • Module version: master branch

How to reproduce (e.g Puppet code you use)

Add the gitlab_ci_runner class to your code specifying the builds_dir parameter, e.g.

class { 'gitlab_ci_runner':
  runner_defaults => {
    'url' => 'https://gitlab.example.com',
  },
  runners => {
    'example' => {
      'executor' => 'shell',
     },
  },
  builds_dir => '/path/to/builds',
}

What are you seeing

The builds_dir path is appended to config.toml outside of the [[runners]] section and is ignored:

concurrent = 1
check_interval = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "example"
  url = "https://gitlab.example.com"
  token = "foo"
  executor = "shell"
  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
builds_dir = "/opt/sitespect/lib/perl/gitlab"

What behaviour did you expect instead

The builds_dir setting in config.toml should be in the [[runners]] section and properly indented in order to be correctly used by the gitlab-runner process.
E.G.

[[runners]]
  name = "example"
  url = "https://gitlab.example.com"
  token = "foo"
  executor = "shell"
  builds_dir = "/opt/sitespect/lib/perl/gitlab"
  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]

Any additional information you'd like to impart

The simple workaround for this is to add a 'builds_dir' key to the runners hash, specifying the value, e.g.

runners => {
  'example-runner' => {
    'executor' => 'shell',
    'builds_dir' => '/path/to/dir',
   },
}
@LongLiveCHIEF LongLiveCHIEF added the bug Something isn't working label Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants