flake: add release job to Hydra
This job is used to indicate that all relevant Hydra jobs of an architecture have built. The idea is to build some CD mechanism on AFNix's Hydra to e.g. auto-update the nightly manual. See https://hydra.afnix.fr/jobset/lix/demo for the current setup. Change-Id: I41724c5884a068bbe41407ab30f8edf8e4914001
This commit is contained in:
@@ -284,6 +284,43 @@
|
||||
overlays.default = overlayFor (p: p.clangStdenv);
|
||||
|
||||
hydraJobs = {
|
||||
# Aggregate job that is finished in Hydra _after_ all constituent jobs (here: grouped by system)
|
||||
# succeed.
|
||||
# This is used to run CD scripts once all builds are finished on Hydra.
|
||||
release = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgsFor.${system}.native;
|
||||
in
|
||||
pkgs.runCommand "release"
|
||||
{
|
||||
_hydraAggregate = true;
|
||||
constituents = lib.filter (x: x != null) (
|
||||
lib.mapAttrsToListRecursiveCond
|
||||
(_: val: !(lib.isDerivation val || builtins.any (system': val ? ${system'}) systems))
|
||||
(
|
||||
path: drv:
|
||||
if drv ? ${system} then
|
||||
lib.concatStringsSep "." (path ++ [ system ])
|
||||
else if drv.system or null == system then
|
||||
lib.concatStringsSep "." path
|
||||
else
|
||||
null
|
||||
)
|
||||
(
|
||||
removeAttrs self.hydraJobs [
|
||||
"devShell"
|
||||
"release"
|
||||
"rl-next"
|
||||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
''
|
||||
touch $out
|
||||
''
|
||||
);
|
||||
|
||||
# Binary package for various platforms.
|
||||
build = forAllSystems (system: self.packages.${system}.nix);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user