RunCommand: pass homepage, description, license, system, and nixname

This commit is contained in:
Graham Christensen 2021-02-24 11:30:33 -05:00
parent 3fda37f65a
commit a756614fa1
No known key found for this signature in database
GPG key ID: FE918C3A98C1030F
3 changed files with 36 additions and 18 deletions

View file

@ -71,6 +71,11 @@ sub buildFinished {
startTime => $build->get_column('starttime'), startTime => $build->get_column('starttime'),
stopTime => $build->get_column('stoptime'), stopTime => $build->get_column('stoptime'),
buildStatus => $build->get_column('buildstatus'), buildStatus => $build->get_column('buildstatus'),
nixName => $build->get_column('nixname'),
system => $build->get_column('system'),
homepage => $build->get_column('homepage'),
description => $build->get_column('description'),
license => $build->get_column('license'),
outputs => [], outputs => [],
products => [], products => [],
metrics => [], metrics => [],

View file

@ -1,6 +1,7 @@
with import ./config.nix; with import ./config.nix;
{ {
metrics = mkDerivation { metrics = (
mkDerivation {
name = "my-build-product"; name = "my-build-product";
builder = "/bin/sh"; builder = "/bin/sh";
outputs = [ "out" "bin" ]; outputs = [ "out" "bin" ];
@ -21,5 +22,12 @@ with import ./config.nix;
'' ''
) )
]; ];
}
) // {
meta = {
license = "GPL";
description = "An example meta property.";
homepage = "https://github.com/NixOS/hydra";
};
}; };
} }

View file

@ -58,10 +58,15 @@ subtest "Validate the top level fields match" => sub {
is($dat->{project}, "tests", "The project matches."); is($dat->{project}, "tests", "The project matches.");
is($dat->{jobset}, "basic", "The jobset matches."); is($dat->{jobset}, "basic", "The jobset matches.");
is($dat->{job}, "metrics", "The job matches."); is($dat->{job}, "metrics", "The job matches.");
is($dat->{nixName}, "my-build-product", "The nixName matches.");
is($dat->{system}, $newbuild->system, "The system matches.");
is($dat->{drvPath}, $newbuild->drvpath, "The derivation path matches."); is($dat->{drvPath}, $newbuild->drvpath, "The derivation path matches.");
is($dat->{timestamp}, $newbuild->timestamp, "The result has a timestamp field."); is($dat->{timestamp}, $newbuild->timestamp, "The result has a timestamp field.");
is($dat->{startTime}, $newbuild->starttime, "The result has a startTime field."); is($dat->{startTime}, $newbuild->starttime, "The result has a startTime field.");
is($dat->{stopTime}, $newbuild->stoptime, "The result has a stopTime field."); is($dat->{stopTime}, $newbuild->stoptime, "The result has a stopTime field.");
is($dat->{homepage}, "https://github.com/NixOS/hydra", "The homepage is passed.");
is($dat->{description}, "An example meta property.", "The description is passed.");
is($dat->{license}, "GPL", "The license is passed.");
}; };
subtest "Validate the outputs match" => sub { subtest "Validate the outputs match" => sub {