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

[?]
Feb 24, 2021, 4:30 PM
E4TV6NH6ZTE6GRLXR7DU37KB4KNUTS4NX572IJKHMOB67ROKWEBQC

Dependencies

  • [2] 6ZXL5UOP Add a plugin to execute arbitrary commands when a build finishes
  • [3] 3AKZKWCR RunCommand: Test

Change contents

  • edit in src/lib/Hydra/Plugin/RunCommand.pm at line 74
    [2.2011]
    [2.2011]
    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
    [3.156][3.156:352]()
    metrics = mkDerivation {
    name = "my-build-product";
    builder = "/bin/sh";
    outputs = [ "out" "bin" ];
    args = [
    (
    builtins.toFile "builder.sh" ''
    #! /bin/sh
    [3.156]
    [3.352]
    metrics = (
    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
    [3.353][3.353:376]()
    echo "$PATH"
    [3.353]
    [3.376]
    echo "$PATH"
  • replacement in tests/jobs/runcommand.nix at line 15
    [3.377][3.377:430]()
    mkdir $bin
    echo "foo" > $bin/bar
    [3.377]
    [3.430]
    mkdir $bin
    echo "foo" > $bin/bar
  • replacement in tests/jobs/runcommand.nix at line 18
    [3.431][3.431:648]()
    metrics=$out/nix-support/hydra-metrics
    mkdir -p "$(dirname "$metrics")"
    echo "lineCoverage 18 %" >> "$metrics"
    echo "maxResident 27 KiB" >> "$metrics"
    ''
    )
    ];
    [3.431]
    [3.648]
    metrics=$out/nix-support/hydra-metrics
    mkdir -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
    [3.3167]
    [3.3167]
    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
    [3.3499]
    [3.3499]
    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.");