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 update #120

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

CI Runner update #120

cdenneen opened this issue Feb 22, 2017 · 2 comments
Labels
enhancement New feature or request needs-help Extra attention is needed

Comments

@cdenneen
Copy link

Currently the method of checking config.toml for runner exists or not needs to be fixed.
While this works for the existence of a runner it doesn't allow for any changes to the runner itself.
The addition of options, tags, image, etc won't generate updated config.toml

It appears somehow the runner hash needs to be compared to current found hash in the config.toml to determine if the runner has updated or not.

To reproduce:

gitlab_ci_runners:
  ruby2.1:
    docker-image: "ruby:2.1"
gitlab_ci_runners_defaults:
  url: "https://gitlab.host/ci"
  registration-token: "XXXX"
  executor: "docker"
  docker-image: "ubuntu:trusty"

to

gitlab_ci_runners:
  ruby2.1:
    docker-image: "ruby:2.FOO"
    tag-list:
      - "ruby2.1"
gitlab_ci_runners_defaults:
  url: "https://gitlab.host/ci"
  registration-token: "XXXX"
  executor: "docker"
  docker-image: "ubuntu:trusty"

Will not update the config.toml to the following:

concurrent = 4
check_interval = 0

[[runners]]
  name = "ruby2.1"
  url = "https://gitlab.host/ci"
  token = "XXXX"
  executor = "docker"
  [runners.docker]
    tls_verify = false
    image = "ruby:2.FOO"
    privileged = false
    disable_cache = false
  [runners.cache]

Also the tag update for the runner isn't something that gets written to config.toml but updated in gitlab so that needs to be checked as well.

Only solution so far would be to empty config.toml and delete the runners in Gitlab UI... then run puppet and it will recreate the runners with current configuration and proper tags.

@tobru
Copy link
Contributor

tobru commented Mar 15, 2017

This is a known issue. If someone is willing to contribute a pull request which improves this situation, I'll be very happy to merge it. Nevertheless: I'm not sure how easy this would be to achieve with Puppet, could be very hard to implement as there needs to be communication with Gitlab itself. Maybe an addition for your workaround to the README could be a "solution".

@LongLiveCHIEF
Copy link
Contributor

Migrated this issue to https://github.com/voxpupuli/puppet-gitlab_ci_runner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-help Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants