read the running rev and the hyperhive flake from /etc files, not the unit
This commit is contained in:
parent
32af7e0639
commit
aed7c8451a
1 changed files with 416 additions and 85 deletions
|
|
@ -127,7 +127,7 @@ let
|
|||
builderCheck =
|
||||
agentModule:
|
||||
let
|
||||
src = env.SWARM_BUILDER_HYPERHIVE_FLAKE;
|
||||
src = withBuilder.services.hyperhive.deploy.hyperhiveFlake;
|
||||
hyperhive = (import "${src}/flake.nix").outputs (
|
||||
self.inputs
|
||||
// {
|
||||
|
|
@ -262,10 +262,15 @@ let
|
|||
}
|
||||
{
|
||||
# The check builds on the sources this host was deployed with, so a green check means
|
||||
# the same hyperhive and nixpkgs base.
|
||||
# the same hyperhive and nixpkgs base. The hyperhive source is a file the
|
||||
# daemon re-reads, not part of its unit.
|
||||
name = "the builder builds on the hyperhive and nixpkgs this host was deployed with";
|
||||
ok =
|
||||
env.SWARM_BUILDER_HYPERHIVE_FLAKE == withBuilder.services.hyperhive.deploy.hyperhiveFlake
|
||||
(builtins.fromJSON (
|
||||
builtins.unsafeDiscardStringContext inner.environment.etc."hyperhive/swarm-builder.json".text
|
||||
)).hyperhive_flake
|
||||
== builtins.unsafeDiscardStringContext withBuilder.services.hyperhive.deploy.hyperhiveFlake
|
||||
&& !(env ? SWARM_BUILDER_HYPERHIVE_FLAKE)
|
||||
&& env.SWARM_BUILDER_NIXPKGS_FLAKE == withBuilder.services.hyperhive.deploy.builder.nixpkgsFlake
|
||||
&& lib.hasSuffix "-check-flake" env.SWARM_BUILDER_CHECK_FLAKE
|
||||
&& env.SWARM_BUILDER_SYSTEM == pkgs.stdenv.hostPlatform.system
|
||||
|
|
|
|||
Loading…
Reference in a new issue