diff options
author | nin <nineinchnade@gmail.com> | 2017-09-14 22:57:46 +0200 |
---|---|---|
committer | nin <nineinchnade@gmail.com> | 2017-09-14 22:57:46 +0200 |
commit | 56054fe431aca35119df307f2098f823fc03d1e9 (patch) | |
tree | 052c12e402d95ea2bf9b4a8c466480e7d59bf3ce /krebs/2configs/gitlab-runner-shackspace.nix | |
parent | 036bd54f3142ba05409b742a809c3082176e4596 (diff) | |
parent | de16ae2a12145901c3d9e2efef062b161b9448e3 (diff) |
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'krebs/2configs/gitlab-runner-shackspace.nix')
-rw-r--r-- | krebs/2configs/gitlab-runner-shackspace.nix | 34 |
1 files changed, 34 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..d9b4cd589 --- /dev/null +++ b/krebs/2configs/gitlab-runner-shackspace.nix @@ -0,0 +1,34 @@ +{ 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 + ]; + systemd.services.gitlab-runner.serviceConfig.PrivateTmp = true; + 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] + + ''; + }; +} |