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 #16

Open
LongLiveCHIEF opened this issue Aug 19, 2018 · 4 comments
Open

CI Runner Update #16

LongLiveCHIEF opened this issue Aug 19, 2018 · 4 comments

Comments

@LongLiveCHIEF
Copy link
Contributor

Note: Migrated from voxpupuli/puppet-gitlab#120, opened by @cdenneen


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.

@Dan33l
Copy link
Member

Dan33l commented Sep 13, 2018

@bogomips
Copy link

bogomips commented Oct 4, 2018

Same problem here,
did you guys find a solution?

would unregister and re-register the runner be a workaround?

@AKuederle
Copy link

Does unregistering a runner also remove it from the gitlab interface? Because if your just delete runners from the config file, you need to additionally manually remove them in the interface

@cdenneen
Copy link

cdenneen commented Mar 1, 2019

If I recall if you unregister the runner but the config.toml still has it, then no new runner will be registered. You have to unregister and delete from config.toml in order for it to be recreated/registered

To @tobru point (voxpupuli/puppet-gitlab#120 (comment)) maybe this would need to be implemented with puppet tasks?

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

5 participants