gitlab-runner-shackspace: init
This commit is contained in:
parent
8a18512575
commit
d608f17c4c
@ -10,6 +10,7 @@
|
||||
<stockholm/krebs/2configs>
|
||||
|
||||
<stockholm/krebs/2configs/buildbot-all.nix>
|
||||
<stockholm/krebs/2configs/gitlab-runner-shackspace.nix>
|
||||
<stockholm/krebs/2configs/binary-cache/nixos.nix>
|
||||
];
|
||||
|
||||
|
33
krebs/2configs/gitlab-runner-shackspace.nix
Normal file
33
krebs/2configs/gitlab-runner-shackspace.nix
Normal file
@ -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]
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
1
krebs/6tests/data/secrets/shackspace-gitlab-ci-token.nix
Normal file
1
krebs/6tests/data/secrets/shackspace-gitlab-ci-token.nix
Normal file
@ -0,0 +1 @@
|
||||
"lol"
|
Loading…
Reference in New Issue
Block a user