clouvider-lon01: set up as cache builder

This commit is contained in:
Luke Granger-Brown 2020-11-04 17:30:28 +00:00
parent 252ad42fb2
commit 855feececa
2 changed files with 28 additions and 0 deletions

View file

@ -13,6 +13,8 @@ nixCache:
- "nix run -f ./ third_party.nixpkgs.bash -c ./hack/populate_secrets.sh"
- "nix build -v -f ./ci-root.nix --substituters \"https://cache.nixos.org s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1\""
- "nix copy -v --to 's3://lukegb-nix-cache?endpoint=storage.googleapis.com' ./result"
tags:
- cacher
.deploy:
stage: deploy

View file

@ -220,5 +220,31 @@ in {
"d /run/minotarproxy 0700 minotarproxy - -"
];
environment.etc."secrets/gitlab-runner-registration" = {
text = ''
CI_SERVER_URL=https://hg.lukegb.com
REGISTRATION_TOKEN=${depot.ops.secrets.deployer.registrationToken}
'';
mode = "0600";
};
services.gitlab-runner = {
enable = true;
concurrent = 1;
services = {
deployer = {
registrationConfigFile = "/etc/secrets/gitlab-runner-registration";
executor = "shell";
tagList = [ "cacher" ];
};
};
gracefulTermination = true;
gracefulTimeout = "4min";
package = depot.nix.pkgs.heptapod-runner;
};
users.users.gitlab-runner = {
createHome = true;
home = "/srv/gitlab-runner";
};
system.stateVersion = "20.09";
}