releaseTools: Add ‘aggregate’ function

An aggregate is a trivial build that depends on other builds.  This is
intended to provide a declarative replacement of Hydra's "view"
mechanism.

For instance, you can define an aggregate named "critical" that
depends on a selected set of jobs:

  critical = releaseTools.aggregate
    { name = "foo-${tarball.version}";
      members =
        [ tarball
          build.x86_64-linux
          ...
        ];
      meta.description = "Release-critical builds";
    };

The "critical" build will only succeed if all its members
(dependencies) succeed.
This commit is contained in:
Eelco Dolstra 2013-03-20 15:52:08 +01:00
parent f2726c5c57
commit b38647766d

View File

@ -39,4 +39,14 @@ rec {
{ inherit stdenv vmTools checkinstall;
} // args);
aggregate =
{ name, members, meta ? { } }:
pkgs.runCommand name
{ inherit members meta;
_hydraAggregate = true;
}
''
echo $members > $out
'';
}