diff options
author | makefu <github@syntax-fehler.de> | 2017-08-16 15:09:38 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2017-08-16 15:09:38 +0200 |
commit | d608f17c4c87db745878160bbe22d4c8a806ac2a (patch) | |
tree | 55ddd3e8490394970c01b9a766a86363f6cb546f /krebs/2configs | |
parent | 8a185125754aa89890eb1746c748138a6eb7c2ab (diff) |
gitlab-runner-shackspace: init
Diffstat (limited to 'krebs/2configs')
-rw-r--r-- | krebs/2configs/gitlab-runner-shackspace.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/krebs/2configs/gitlab-runner-shackspace.nix b/krebs/2configs/gitlab-runner-shackspace.nix new file mode 100644 index 000000000..7794f1dd2 --- /dev/null +++ b/krebs/2configs/gitlab-runner-shackspace.nix @@ -0,0 +1,33 @@ +{ config, ... }: +let + url = "https://git.shackspace.de/"; + # generate token from CI-token via: + ## gitlab-runner register + ## cat /etc/gitlab-runner/config.toml + token = import <secrets/shackspace-gitlab-ci-token.nix> ; +in { + systemd.services.gitlab-runner.path = [ + "/run/wrappers" # /run/wrappers/bin/su + "/" # /bin/sh + ]; + virtualisation.docker.enable = true; + services.gitlab-runner = { + enable = true; + # configFile, configOptions and gracefulTimeout not yet in stable + # gracefulTimeout = "120min"; + configText = '' + concurrent = 1 + check_interval = 0 + + [[runners]] + name = "krebs-shell" + url = "${url}" + token = "${token}" + executor = "shell" + shell = "sh" + environment = ["PATH=/bin:/run/wrappers/bin:/etc/per-user/gitlab-runner/bin:/etc/per-user-pkgs/gitlab-runner/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin"] + [runners.cache] + + ''; + }; +} |