CI changes (all hosts)

This commit is contained in:
kat witch 2021-08-08 21:34:35 +01:00
parent 4047af32c6
commit 0bd5d2b237
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
3 changed files with 118 additions and 3 deletions

View file

@ -46,7 +46,8 @@ with lib; {
};
displayName = "niv update build";
environment = [ "OPENSSH_PRIVATE_KEY" "CACHIX_SIGNING_KEY" "GITHUB_REF" ];
command = ''
command = let hostnames = remove "dummy" (lib.attrNames (import ../.).hosts);
hostBuildString = concatMapStrings (host: "nix build -Lf . network.nodes.${host}.deploy.system && nix-collect-garbage -d && " ) hostnames; in ''
# ${toString builtins.currentTime}
if [[ -n $OPENSSH_PRIVATE_KEY ]]; then
mkdir ~/.ssh
@ -75,7 +76,7 @@ with lib; {
git -P diff nix/sources.json
nix build --no-link -Lf . sourceCache.local
echo "checking that network.nodes.still build..." >&2
if nix build -Lf . network.nodes.athame.deploy.system && nix-collect-garbage -d && nix build -Lf . network.nodes.yule.system && nix-collect-garbage -d && nix build -Lf . network.nodes.samhain.system; then
if ${hostBuildString}; then
if [[ -n $CACHIX_SIGNING_KEY ]]; then
nix build --no-link -Lf . sourceCache.all
cachix push kittywitch $(nix eval --raw -f . sourceCache.allStr)