feat(whitby): Run a handful of Buildkite agents
This is the point of the machine, afterall. Change-Id: I15c11600c1c18fa8962d57f75f99a72e1553f9c2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/853 Reviewed-by: glittershark <grfn@gws.fyi> Reviewed-by: BuildkiteCI Tested-by: BuildkiteCI
This commit is contained in:
parent
7114e72d81
commit
4d9c6dbbe2
1 changed files with 21 additions and 0 deletions
|
@ -1,8 +1,18 @@
|
||||||
{ depot, lib, ... }:
|
{ depot, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
inherit (builtins) listToAttrs;
|
||||||
|
inherit (lib) range;
|
||||||
|
|
||||||
nixpkgs = import depot.third_party.nixpkgsSrc {};
|
nixpkgs = import depot.third_party.nixpkgsSrc {};
|
||||||
|
|
||||||
|
# All Buildkite hooks are actually besadii, but it's being invoked
|
||||||
|
# with different names.
|
||||||
|
buildkiteHooks = depot.third_party.runCommandNoCC "buildkite-hooks" {} ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
ln -s ${depot.ops.besadii}/bin/besadii $out/bin/post-command
|
||||||
|
'';
|
||||||
|
|
||||||
systemForConfig = configuration: (depot.third_party.nixos {
|
systemForConfig = configuration: (depot.third_party.nixos {
|
||||||
inherit configuration;
|
inherit configuration;
|
||||||
}).system;
|
}).system;
|
||||||
|
@ -119,6 +129,17 @@ in systemForConfig {
|
||||||
programs.mtr.enable = true;
|
programs.mtr.enable = true;
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
# Run a handful of Buildkite agents to support parallel builds.
|
||||||
|
services.buildkite-agents = listToAttrs (map (n: rec {
|
||||||
|
name = "whitby-${toString n}";
|
||||||
|
value = {
|
||||||
|
inherit name;
|
||||||
|
enable = true;
|
||||||
|
tokenPath = "/etc/secrets/buildkite-agent-token";
|
||||||
|
hooks.post-command = "${buildkiteHooks}/bin/post-command";
|
||||||
|
};
|
||||||
|
}) (range 1 8));
|
||||||
|
|
||||||
environment.systemPackages = with nixpkgs; [
|
environment.systemPackages = with nixpkgs; [
|
||||||
bb
|
bb
|
||||||
curl
|
curl
|
||||||
|
|
Loading…
Reference in a new issue