gitlab-runner configuration not showing in config.toml

5.2k Views Asked by At

I have a simple question I'm hosting a GitLab server and when I want to register a new runner it's successfully created but when I go to :

~/.gitlab-runner/config.toml

this config.toml file doesn't show me, my new configuration runner. it just shows my older runners. It's something like this for my other runners:

[[runners]]
  name = "minoemix-superadmin"
  url = "..."
  token = "..."
  executor = "docker"
  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]
  [runners.docker]
    tls_verify = false
    image = "docker:19.03.12"
    privileged = true
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/certs/client","/cache"]
    shm_size = 0

Does anyone know why? I need my new runner configuration.

1

There are 1 best solutions below

0
On BEST ANSWER

First, as mentioned in Advanced configuration, check if another file is modified instead:

You can find the config.toml file in:

  • /etc/gitlab-runner/ on *nix systems when GitLab Runner is executed as root (this is also the path for service configuration)
  • ~/.gitlab-runner/ on *nix systems when GitLab Runner is executed as non-root
  • ./ on other systems

So it depends on your OS and on how you have launched GitLab (as root, or as a user account).

Second, as in this issue, check if you have done a gitlab-runner register which should trigger Merging configuration from template file...: it shows which config.toml file it updates.