fix(ops/pipelines): fix anchor steps

Every buildkite user needs to be able to update these symlinks, and the
directory doesn't exist. It was probably created imperatively on whitby.

Use a tmpfiles rule creating a /nix/var/nix/gcroots/buildkite directory,
and add a `canon` symlink in there.

Change-Id: Ic4d67fbb69f77cebe891b0fff9b824713ebec87c
Reviewed-on: https://cl.snix.dev/c/snix/+/30247
Tested-by: besadii
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
This commit is contained in:
Florian Klink 2025-03-22 22:28:37 +00:00
parent af96ef21c9
commit 8c4f447ec7
2 changed files with 5 additions and 1 deletions

View file

@ -91,6 +91,9 @@ in
group = "buildkite-agents"; group = "buildkite-agents";
}; };
}; };
systemd.tmpfiles.rules = [
"d '/nix/var/nix/gcroots/buildkite' 0770 - buildkite-agents - -"
];
services.openssh.enable = true; services.openssh.enable = true;
time.timeZone = "UTC"; time.timeZone = "UTC";

View file

@ -25,7 +25,8 @@ let
label = ":anchor:"; label = ":anchor:";
branches = "refs/heads/canon"; branches = "refs/heads/canon";
command = '' command = ''
nix-build -A ci.gcroot --out-link /nix/var/nix/gcroots/depot/canon rm /nix/var/nix/gcroots/buildkite/canon
nix-build -A ci.gcroot --out-link /nix/var/nix/gcroots/buildkite/canon
''; '';
# Ensure that anchoring happens on build01, so that a possibly deployed # Ensure that anchoring happens on build01, so that a possibly deployed