RunCommand: pass homepage, description, license, system, and nixname
[?]
Feb 24, 2021, 4:30 PM
E4TV6NH6ZTE6GRLXR7DU37KB4KNUTS4NX572IJKHMOB67ROKWEBQCDependencies
- [2]
6ZXL5UOPAdd a plugin to execute arbitrary commands when a build finishes - [3]
3AKZKWCRRunCommand: Test
Change contents
- edit in src/lib/Hydra/Plugin/RunCommand.pm at line 74
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'), - replacement in tests/jobs/runcommand.nix at line 3
metrics = mkDerivation {name = "my-build-product";builder = "/bin/sh";outputs = [ "out" "bin" ];args = [(builtins.toFile "builder.sh" ''#! /bin/shmetrics = (mkDerivation {name = "my-build-product";builder = "/bin/sh";outputs = [ "out" "bin" ];args = [(builtins.toFile "builder.sh" ''#! /bin/sh - replacement in tests/jobs/runcommand.nix at line 13
echo "$PATH"echo "$PATH" - replacement in tests/jobs/runcommand.nix at line 15
mkdir $binecho "foo" > $bin/barmkdir $binecho "foo" > $bin/bar - replacement in tests/jobs/runcommand.nix at line 18
metrics=$out/nix-support/hydra-metricsmkdir -p "$(dirname "$metrics")"echo "lineCoverage 18 %" >> "$metrics"echo "maxResident 27 KiB" >> "$metrics"'')];metrics=$out/nix-support/hydra-metricsmkdir -p "$(dirname "$metrics")"echo "lineCoverage 18 %" >> "$metrics"echo "maxResident 27 KiB" >> "$metrics"'')];}) // {meta = {license = "GPL";description = "An example meta property.";homepage = "https://github.com/NixOS/hydra";}; - edit in tests/plugins/runcommand.t at line 61
is($dat->{nixName}, "my-build-product", "The nixName matches.");is($dat->{system}, $newbuild->system, "The system matches."); - edit in tests/plugins/runcommand.t at line 67
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.");