* Put actions related to builds under /build (e.g. /log/<buildid>

[?]
Feb 25, 2009, 10:52 AM
SMM4HQTPAY45254O7GQOJVLHP5LZ6BXDKGNE7IKUJHB5XKH244ZAC

Dependencies

  • [2] 6JGCGK5X
  • [3] L7LFU6IQ * Make build steps clickable as well.
  • [4] IW6XNRL7
  • [5] WZ3AEJ67 * hydra_update_gc_roots.pl registers build outputs that should be kept
  • [6] Y35C6GHH * One-click installs.
  • [7] AS5PAYLI
  • [8] JFZNAYJX * Showing releases.
  • [9] NYC3LZKH * Generate NAR archives on the fly. Necessary for producing channels
  • [10] CLJQCY2X * Store info about all the build actions and allow them to be
  • [11] UAPS46BQ
  • [12] A4ZMBK7D * Icon for ISOs.
  • [13] IWVA2P2Y * Generate manifests on demand. Next step: generate NAR archives on
  • [14] L2E6EVE2 * Merged the Build and Job tables.
  • [15] BD3GRK4B * Get rid of "positive failures" and separate log phases.
  • [16] VVDQKVNL
  • [17] MOCEUXZA * Support serving products that are directories (such as manuals or
  • [18] 2GK5DOU7 * Downloading closures.
  • [19] JLDUSNUO * Unify rendering of finished and scheduled builds.
  • [20] HK32XC42
  • [21] GCHNNFZP
  • [22] L5VIEXSC * Allow downloading of build products.
  • [23] CMU3YKOU * Store the release name.
  • [24] BA46C5LN * Pretty-print the logs.
  • [25] M3WSK4CB
  • [26] UHANDRAR * Closure downloads: don't include the product number; it's not needed.
  • [27] WHAFVCEI
  • [28] ELCI5T2A * Show the latest build for each job.
  • [29] 2AUODJBT
  • [30] LQNBKF3D
  • [31] J5UVLXOK * Start of a basic Catalyst web interface.
  • [32] JD27RBKM
  • [33] SHBLLAVH * More global substitution.

Change contents

  • replacement in src/Hydra/lib/Hydra/Controller/Root.pm at line 8
    [7.909][7.909:1045]()
    #
    # Sets the actions in this controller to be registered with no prefix
    # so they function identically to actions created in MyApp.pm
    #
    [7.909]
    [7.1045]
    # Put this controller at top-level.
  • replacement in src/Hydra/lib/Hydra/Controller/Root.pm at line 27
    [7.1122][7.1122:1224]()
    $c->stash->{template} = 'error.tt';
    $c->stash->{error} = $msg;
    $c->response->status(404);
    [7.1122]
    [7.1224]
    $c->error($msg);
    $c->detach;
  • edit in src/Hydra/lib/Hydra/Controller/Root.pm at line 572
    [7.1592]
    [7.1592]
    $c->response->status(404);
  • replacement in src/Hydra/lib/Hydra/Controller/Root.pm at line 576
    [7.1596][7.1596:1615]()
    sub build :Local {
    [7.1596]
    [7.468]
    sub build : Chained('/') PathPart CaptureArgs(1) {
  • edit in src/Hydra/lib/Hydra/Controller/Root.pm at line 578
    [7.498]
    [7.1647]
    $c->stash->{id} = $id;
    $c->stash->{build} = getBuild($c, $id);
    if (!defined $c->stash->{build}) {
    error($c, "Build with ID $id doesn't exist.");
    $c->response->status(404);
    return;
    }
  • replacement in src/Hydra/lib/Hydra/Controller/Root.pm at line 589
    [7.248][7.1648:1760](),[7.1648][7.1648:1760]()
    my $build = getBuild($c, $id);
    return error($c, "Build with ID $id doesn't exist.") if !defined $build;
    [7.1648]
    [7.249]
    $c->stash->{curProject} = $c->stash->{build}->project;
    }
  • edit in src/Hydra/lib/Hydra/Controller/Root.pm at line 592
    [7.250][7.250:297]()
    $c->stash->{curProject} = $build->project;
  • replacement in src/Hydra/lib/Hydra/Controller/Root.pm at line 593
    [7.399][7.1765:1865](),[7.1765][7.1765:1865]()
    $c->stash->{template} = 'build.tt';
    $c->stash->{build} = $build;
    $c->stash->{id} = $id;
    [7.399]
    [7.0]
    sub view_build : Chained('build') PathPart('') Args(0) {
    my ($self, $c) = @_;
  • edit in src/Hydra/lib/Hydra/Controller/Root.pm at line 596
    [7.1]
    [7.978]
    my $build = $c->stash->{build};
    $c->stash->{template} = 'build.tt';
  • edit in src/Hydra/lib/Hydra/Controller/Root.pm at line 600
    [7.1011][5.0:1]()
  • replacement in src/Hydra/lib/Hydra/Controller/Root.pm at line 609
    [7.1869][7.1869:1886](),[7.1886][7.499:529]()
    sub log :Local {
    my ($self, $c, $id) = @_;
    [7.1869]
    [7.1929]
    sub view_nixlog : Chained('build') PathPart('nixlog') Args(1) {
    my ($self, $c, $stepnr) = @_;
  • replacement in src/Hydra/lib/Hydra/Controller/Root.pm at line 612
    [7.1930][7.1930:1965](),[7.1965][7.33:102](),[7.102][7.2042:2043](),[7.2042][7.2042:2043](),[7.2043][7.103:200]()
    my $build = getBuild($c, $id);
    return error($c, "Build $id doesn't exist.") if !defined $build;
    return error($c, "Build $id didn't produce a log.") if !defined $build->resultInfo->logfile;
    [7.1930]
    [7.200]
    my $step = $c->stash->{build}->buildsteps->find({stepnr => $stepnr});
    return error($c, "Build doesn't have a build step $stepnr.") if !defined $step;
  • replacement in src/Hydra/lib/Hydra/Controller/Root.pm at line 616
    [7.2253][7.202:235]()
    $c->stash->{build} = $build;
    [7.2253]
    [7.2309]
    $c->stash->{step} = $step;
  • replacement in src/Hydra/lib/Hydra/Controller/Root.pm at line 619
    [7.2365][4.0:69]()
    $c->stash->{logtext} = loadLog($c, $build->resultInfo->logfile);
    [7.2365]
    [7.162]
    $c->stash->{logtext} = loadLog($c, $step->logfile);
  • replacement in src/Hydra/lib/Hydra/Controller/Root.pm at line 623
    [7.166][7.166:186](),[7.186][7.530:569](),[7.569][7.227:340](),[7.227][7.227:340]()
    sub nixlog :Local {
    my ($self, $c, $id, $stepnr) = @_;
    my $build = getBuild($c, $id);
    return error($c, "Build with ID $id doesn't exist.") if !defined $build;
    [7.166]
    [7.340]
    sub view_log : Chained('build') PathPart('log') Args(0) {
    my ($self, $c) = @_;
  • replacement in src/Hydra/lib/Hydra/Controller/Root.pm at line 626
    [7.341][7.341:491]()
    my $step = $build->buildsteps->find({stepnr => $stepnr});
    return error($c, "Build $id doesn't have a build step $stepnr.") if !defined $step;
    [7.341]
    [7.0]
    return error($c, "Build didn't produce a log.") if !defined $c->stash->{build}->resultInfo->logfile;
  • edit in src/Hydra/lib/Hydra/Controller/Root.pm at line 628
    [7.1][7.1:108](),[7.108][7.491:496](),[7.491][7.491:496]()
    return error($c, "Build step $stepnr of build $id does not have a log file.") if $step->logfile eq "";
  • edit in src/Hydra/lib/Hydra/Controller/Root.pm at line 629
    [7.534][2.0:33](),[2.33][7.561:592](),[7.561][7.561:592]()
    $c->stash->{build} = $build;
    $c->stash->{step} = $step;
  • replacement in src/Hydra/lib/Hydra/Controller/Root.pm at line 631
    [7.648][4.70:126]()
    $c->stash->{logtext} = loadLog($c, $step->logfile);
    [7.648]
    [7.2413]
    $c->stash->{logtext} = loadLog($c, $c->stash->{build}->resultInfo->logfile);
  • replacement in src/Hydra/lib/Hydra/Controller/Root.pm at line 649
    [7.2][7.2:24](),[7.24][7.570:630]()
    sub download :Local {
    my ($self, $c, $id, $productnr, $filename, @path) = @_;
    [7.2]
    [7.2595]
    sub download : Chained('build') PathPart('download') {
    my ($self, $c, $productnr, $filename, @path) = @_;
  • replacement in src/Hydra/lib/Hydra/Controller/Root.pm at line 652
    [7.2596][7.80:192](),[7.192][7.2596:2597](),[7.2596][7.2596:2597](),[7.2597][7.193:358]()
    my $build = getBuild($c, $id);
    return error($c, "Build with ID $id doesn't exist.") if !defined $build;
    my $product = $build->buildproducts->find({productnr => $productnr});
    return error($c, "Build $id doesn't have a product $productnr.") if !defined $product;
    [7.2596]
    [7.358]
    my $product = $c->stash->{build}->buildproducts->find({productnr => $productnr});
    return error($c, "Build doesn't have a product $productnr.") if !defined $product;
  • edit in src/Hydra/lib/Hydra/Controller/Root.pm at line 745
    [7.402]
    [7.402]
    sub end : ActionClass('RenderView') {
    my ($self, $c) = @_;
  • replacement in src/Hydra/lib/Hydra/Controller/Root.pm at line 749
    [7.231][7.2597:2636](),[7.293][7.2597:2636](),[7.403][7.2597:2636](),[7.510][7.2597:2636](),[7.2597][7.2597:2636]()
    sub end : ActionClass('RenderView') {}
    [7.403]
    [7.2636]
    if (scalar @{$c->error}) {
    $c->stash->{template} = 'error.tt';
    $c->stash->{errors} = $c->error;
    $c->clear_errors;
    }
    }
  • replacement in src/Hydra/root/build.tt at line 124
    [7.2530][7.2530:2612]()
    <a href="[% c.uri_for('/log' build.id) %]"><strong>Available</strong></a>
    [7.2530]
    [7.2612]
    <a href="[% c.uri_for('build' build.id 'log') %]"><strong>Available</strong></a>
  • edit in src/Hydra/root/build.tt at line 181
    [7.4155]
    [3.0]
    [% log = c.uri_for('build' build.id 'nixlog' step.stepnr) %]
  • replacement in src/Hydra/root/build.tt at line 183
    [3.58][3.58:179]()
    [% IF step.logfile %] onclick="window.location = '[% c.uri_for('/nixlog' build.id step.stepnr) %]'" [% END %]>
    [3.58]
    [7.4166]
    [% IF step.logfile %] onclick="window.location = '[% log %]'" [% END %]>
  • replacement in src/Hydra/root/build.tt at line 216
    [7.322][7.322:402]()
    (<a href="[% c.uri_for('/nixlog' build.id step.stepnr) %]">log</a>)
    [7.322]
    [7.402]
    (<a href="[% log %]">log</a>)
  • replacement in src/Hydra/root/error.tt at line 6
    [7.8555][7.2463:2565]()
    <p>I'm very sorry, but an error occurred: <span class="error-msg">[% HTML.escape(error) %]</span></p>
    [7.8555]
    [7.8645]
    <p>I'm very sorry, but an error occurred: <span class="error-msg">[% FOREACH error IN errors %] [% HTML.escape(error) %] [% END %]</span></p>
  • replacement in src/Hydra/root/product-list.tt at line 8
    [7.3209][6.911:916]()
    [7.3209]
    [7.3234]
    [% uri = c.uri_for('build' build.id 'download' product.productnr product.name) %]
  • replacement in src/Hydra/root/product-list.tt at line 16
    [6.951][6.951:1006]()
    <a href="[% c.uri_for('/nixpkg' build.id) %]">
    [6.951]
    [6.1006]
    [% uri = c.uri_for('nixpkg' build.id) %]
    <a href="[% uri %]">
  • replacement in src/Hydra/root/product-list.tt at line 31
    [6.1707][6.1707:1810]()
    <pre>$ nix-install-package --non-interactive --url [% c.uri_for('/nixpkg' build.id) %]</pre>
    [6.1707]
    [6.1810]
    <pre>$ nix-install-package --non-interactive --url [% uri %]</pre>
  • replacement in src/Hydra/root/product-list.tt at line 82
    [6.2529][7.4409:4497](),[7.4409][7.4409:4497]()
    <a href="[% c.uri_for('/download' build.id product.productnr product.name) %]">
    [6.2529]
    [7.4497]
    <a href="[% uri %]">
  • replacement in src/Hydra/root/product-list.tt at line 102
    [7.5285][7.5285:5477]()
    <a href="[% c.uri_for('/download' build.id product.productnr product.name) %]">
    <tt>[% c.uri_for('/download' build.id product.productnr product.name) %]</tt>
    [7.5285]
    [7.5477]
    <a href="[% uri %]">
    <tt>[% uri %]</tt>
  • replacement in src/Hydra/root/product-list.tt at line 118
    [6.2577][7.5954:6042](),[7.5954][7.5954:6042]()
    <a href="[% c.uri_for('/download' build.id product.productnr product.name) %]">
    [6.2577]
    [7.6042]
    <a href="[% uri %]">
  • replacement in src/Hydra/root/product-list.tt at line 132
    [6.2618][7.6363:6451](),[7.6363][7.6363:6451]()
    <a href="[% c.uri_for('/download' build.id product.productnr product.name) %]">
    [6.2618]
    [7.6451]
    <a href="[% uri %]">