diff --git a/doc/manual/installation.xml b/doc/manual/installation.xml index 4717bb0d..a1c410d5 100644 --- a/doc/manual/installation.xml +++ b/doc/manual/installation.xml @@ -54,7 +54,7 @@ regular package management system. Thus, you can use Hydra on a Debian, Fedora, SuSE, or Ubuntu system. - +
@@ -104,7 +104,7 @@ nix-env -i hydra hydra-build hydra-init hydra-update-gc-roots -hydra-eval-jobs hydra-queue-runner +hydra-eval-jobs hydra-queue-runner hydra-evaluator hydra-server @@ -191,7 +191,7 @@ hydra-init Getting Started - To start the Hydra web server, execute: + To start the Hydra web server, execute: hydra-server @@ -225,7 +225,7 @@ hydra-server functional, though it's possible to temporarily stop any one of them for maintenance purposes, for instance. - +
diff --git a/doc/manual/introduction.xml b/doc/manual/introduction.xml index 984fce10..956732f1 100644 --- a/doc/manual/introduction.xml +++ b/doc/manual/introduction.xml @@ -219,8 +219,8 @@ http://hydra.nixos.org/. - That installation is used to build software components from the - Nix, + That installation is used to build software components from the + Nix, NixOS, GNU, Stratego/XT, diff --git a/doc/manual/manual.xml b/doc/manual/manual.xml index 49a46ef4..2d2b6500 100644 --- a/doc/manual/manual.xml +++ b/doc/manual/manual.xml @@ -58,12 +58,12 @@ March 2010 - + - - + + diff --git a/doc/manual/projects.xml b/doc/manual/projects.xml index 2d2586b0..f7e7a8f5 100644 --- a/doc/manual/projects.xml +++ b/doc/manual/projects.xml @@ -45,7 +45,7 @@ Identifier: patchelf get an error message such as: -I'm very sorry, but an error occurred: +I'm very sorry, but an error occurred: DBIx::Class::ResultSet::create(): DBI Exception: DBD::SQLite::st execute failed: column name is not unique(19) at dbdimp.c line 402 @@ -122,14 +122,14 @@ Nix expression: release.nix in input patchelfSrc be added. For patchelf we declare the following inputs. -patchelfSrc +patchelfSrc 'Subversion checkout' https://svn.nixos.org/repos/nix/patchelf/trunk nixpkgs 'Subversion checkout' https://svn.nixos.org/repos/nix/nixpkgs/trunk officialRelease Boolean false -system String value "i686-linux" +system String value "i686-linux" @@ -389,7 +389,7 @@ $ nix-build -I ~/src release.nix -A build The build job reuses the result of the tarball job, rebuilding it only if it needs to. - +
diff --git a/hydra-module.nix b/hydra-module.nix index ea1f711a..febf4fa6 100644 --- a/hydra-module.nix +++ b/hydra-module.nix @@ -5,14 +5,14 @@ with pkgs.lib; let cfg = config.services.hydra; - hydraConf = pkgs.writeScript "hydra.conf" + hydraConf = pkgs.writeScript "hydra.conf" '' using_frontend_proxy 1 base_uri ${cfg.hydraURL} notification_sender ${cfg.notificationSender} max_servers 25 ''; - + env = ''export NIX_REMOTE=daemon '' + ''HYDRA_DBI="${cfg.dbi}" '' + ''HYDRA_CONFIG=${cfg.baseDir}/data/hydra.conf '' @@ -29,7 +29,7 @@ in ###### interface options = { services.hydra = rec { - + enable = mkOption { default = false; description = '' @@ -50,7 +50,7 @@ in The user the Hydra services should run as. ''; }; - + dbi = mkOption { default = "dbi:Pg:dbname=hydra;host=localhost;user=root;"; example = "dbi:SQLite:/home/hydra/db/hydra.sqlite"; @@ -58,18 +58,18 @@ in The DBI string for Hydra database connection. ''; }; - + hydra = mkOption { default = pkgs.hydra; description = '' Location of hydra ''; }; - + hydraURL = mkOption { default = "http://hydra.nixos.org"; description = '' - The base URL for the Hydra webserver instance. Used for links in emails. + The base URL for the Hydra webserver instance. Used for links in emails. ''; }; @@ -83,23 +83,23 @@ in minimumDiskFree = mkOption { default = 5; description = '' - Threshold of minimum disk space (G) to determine if queue runner should run or not. + Threshold of minimum disk space (G) to determine if queue runner should run or not. ''; }; minimumDiskFreeEvaluator = mkOption { default = 2; description = '' - Threshold of minimum disk space (G) to determine if evaluator should run or not. + Threshold of minimum disk space (G) to determine if evaluator should run or not. ''; }; notificationSender = mkOption { default = "e.dolstra@tudelft.nl"; description = '' - Sender email address used for email notifications. + Sender email address used for email notifications. ''; - }; + }; tracker = mkOption { default = ""; @@ -120,12 +120,12 @@ in description = '' If hydra upstart jobs should start automatically. ''; - }; - + }; + }; }; - + ###### implementation @@ -138,7 +138,7 @@ in home = cfg.baseDir; createHome = true; useDefaultShell = true; - } + } ]; # We have our own crontab entries for GC, see below. diff --git a/release.nix b/release.nix index a79a62a4..9b2e0749 100644 --- a/release.nix +++ b/release.nix @@ -4,7 +4,7 @@ rec { - tarball = + tarball = with import { }; let nix = nixUnstable; in @@ -41,7 +41,7 @@ rec { ''; }; - build = + build = { system ? "x86_64-linux" }: let pkgs = import {inherit system;}; in @@ -52,7 +52,7 @@ rec { releaseTools.nixBuild { name = "hydra"; - src = tarball; + src = tarball; configureFlags = "--with-nix=${nix}"; buildInputs = @@ -99,10 +99,10 @@ rec { with import { inherit system; }; { - + install = simpleTest { - machine = + machine = { config, pkgs, ... }: { services.postgresql.enable = true; environment.systemPackages = [ hydra ]; @@ -123,9 +123,9 @@ rec { #$machine->mustSucceed("HYDRA_DATA=/var/lib/hydra HYDRA_DBI='dbi:Pg:dbname=hydra;user=hydra;' hydra-server >&2 &"); #$machine->waitForOpenPort("3000"); ''; - + }; - + }; diff --git a/src/c/hydra-eval-jobs.cc b/src/c/hydra-eval-jobs.cc index 7b94512c..76d3d2da 100644 --- a/src/c/hydra-eval-jobs.cc +++ b/src/c/hydra-eval-jobs.cc @@ -92,7 +92,7 @@ static string queryMetaFieldString(MetaInfo & meta, const string & name) return value.stringValue; } - + static int queryMetaFieldInt(MetaInfo & meta, const string & name, int def) { MetaValue value = meta[name]; @@ -118,7 +118,7 @@ static void findJobsWrapped(EvalState & state, XMLWriter & doc, if (v.type == tAttrs) { DrvInfo drv; - + if (getDerivation(state, v, drv, false)) { XMLAttrs xmlAttrs; Path drvPath; @@ -162,7 +162,7 @@ static void findJobsWrapped(EvalState & state, XMLWriter & doc, Path root = gcRootsDir + "/" + baseNameOf(drvPath); if (!pathExists(root)) addPermRoot(*store, drvPath, root, false); } - + XMLOpenElement _(doc, "job", xmlAttrs); showArgsUsed(doc, argsUsed); } @@ -213,7 +213,7 @@ void run(Strings args) /* Prevent undeclared dependencies in the evaluation via $NIX_PATH. */ unsetenv("NIX_PATH"); - + EvalState state; Path releaseExpr; AutoArgs autoArgs; @@ -249,9 +249,9 @@ void run(Strings args) } if (releaseExpr == "") throw UsageError("no expression specified"); - + if (gcRootsDir == "") printMsg(lvlError, "warning: `--gc-roots-dir' not specified"); - + store = openStore(); Expr * e = state.parseExprFromFile(releaseExpr); diff --git a/src/lib/Hydra/Base/Controller/ListBuilds.pm b/src/lib/Hydra/Base/Controller/ListBuilds.pm index 151fe8e3..226e1d2e 100644 --- a/src/lib/Hydra/Base/Controller/ListBuilds.pm +++ b/src/lib/Hydra/Base/Controller/ListBuilds.pm @@ -9,7 +9,7 @@ use Hydra::Helper::CatalystUtils; sub getJobStatus { my ($self, $c) = @_; - + my $maintainer = $c->request->params->{"maintainer"}; my $latest = $c->stash->{jobStatus}->search( @@ -30,7 +30,7 @@ sub jobstatus : Chained('get_builds') PathPart Args(0) { # A convenient way to see all the errors - i.e. things demanding -# attention - at a glance. +# attention - at a glance. sub errors : Chained('get_builds') PathPart Args(0) { my ($self, $c) = @_; $c->stash->{template} = 'errors.tt'; @@ -44,7 +44,7 @@ sub errors : Chained('get_builds') PathPart Args(0) { [getJobStatus($self, $c)->search({buildStatus => {'!=' => 0}})]; } - + sub all : Chained('get_builds') PathPart { my ($self, $c) = @_; @@ -96,7 +96,7 @@ sub latest : Chained('get_builds') PathPart('latest') { {finished => 1, buildstatus => 0}, {order_by => ["isCurrent DESC", "timestamp DESC"]}); notFound($c, "There is no successful build to redirect to.") unless defined $latest; - + $c->res->redirect($c->uri_for($c->controller('Build')->action_for("view_build"), [$latest->id], @rest)); } @@ -106,12 +106,12 @@ sub latest_for : Chained('get_builds') PathPart('latest-for') { my ($self, $c, $system, @rest) = @_; notFound($c, "You need to specify a platform type in the URL.") unless defined $system; - + my ($latest) = $c->stash->{allBuilds}->search( {finished => 1, buildstatus => 0, system => $system}, {order_by => ["isCurrent DESC", "timestamp DESC"]}); notFound($c, "There is no successful build for platform `$system' to redirect to.") unless defined $latest; - + $c->res->redirect($c->uri_for($c->controller('Build')->action_for("view_build"), [$latest->id], @rest)); } diff --git a/src/lib/Hydra/Controller/API.pm b/src/lib/Hydra/Controller/API.pm index 283ea0c3..d60df4fb 100644 --- a/src/lib/Hydra/Controller/API.pm +++ b/src/lib/Hydra/Controller/API.pm @@ -27,22 +27,22 @@ sub projectToHash { return { name => $project->name, description => $project->description - }; + }; } sub projects : Chained('api') PathPart('projects') Args(0) { my ($self, $c) = @_; - + my @projects = $c->model('DB::Projects')->search({hidden => 0}, {order_by => 'name'}); my @list; foreach my $p (@projects) { push @list, projectToHash($p); } - - $c->stash->{'plain'} = { - data => scalar (JSON::Any->objToJson(\@list)) + + $c->stash->{'plain'} = { + data => scalar (JSON::Any->objToJson(\@list)) }; $c->forward('Hydra::View::Plain'); } @@ -61,13 +61,13 @@ sub buildToHash { timestamp => $build->timestamp }; - if($build->finished) { + if($build->finished) { $result->{'buildstatus'} = $build->get_column("buildstatus"); } else { $result->{'busy'} = $build->get_column("busy"); $result->{'priority'} = $build->get_column("priority"); } - + return $result; }; @@ -81,20 +81,20 @@ sub latestbuilds : Chained('api') PathPart('latestbuilds') Args(0) { my $jobset = $c->request->params->{jobset}; my $job = $c->request->params->{job}; my $system = $c->request->params->{system}; - + my $filter = {finished => 1}; - $filter->{project} = $project if ! $project eq ""; - $filter->{jobset} = $jobset if ! $jobset eq ""; - $filter->{job} = $job if !$job eq ""; - $filter->{system} = $system if !$system eq ""; - + $filter->{project} = $project if ! $project eq ""; + $filter->{jobset} = $jobset if ! $jobset eq ""; + $filter->{job} = $job if !$job eq ""; + $filter->{system} = $system if !$system eq ""; + my @latest = $c->model('DB::Builds')->search($filter, {rows => $nr, order_by => ["timestamp DESC"] }); - + my @list; push @list, buildToHash($_) foreach @latest; - - $c->stash->{'plain'} = { - data => scalar (JSON::Any->objToJson(\@list)) + + $c->stash->{'plain'} = { + data => scalar (JSON::Any->objToJson(\@list)) }; $c->forward('Hydra::View::Plain'); } @@ -110,7 +110,7 @@ sub jobsetToHash { nrfailed => $jobset->get_column("nrfailed"), nrtotal => $jobset->get_column("nrtotal") }; -} +} sub jobsets : Chained('api') PathPart('jobsets') Args(0) { @@ -123,12 +123,12 @@ sub jobsets : Chained('api') PathPart('jobsets') Args(0) { or notFound($c, "Project $projectName doesn't exist."); my @jobsets = jobsetOverview($c, $project); - + my @list; push @list, jobsetToHash($_) foreach @jobsets; - - $c->stash->{'plain'} = { - data => scalar (JSON::Any->objToJson(\@list)) + + $c->stash->{'plain'} = { + data => scalar (JSON::Any->objToJson(\@list)) }; $c->forward('Hydra::View::Plain'); } @@ -141,12 +141,12 @@ sub queue : Chained('api') PathPart('queue') Args(0) { error($c, "Parameter not defined!") if !defined $nr; my @builds = $c->model('DB::Builds')->search({finished => 0}, {rows => $nr, order_by => ["busy DESC", "priority DESC", "timestamp"]}); - + my @list; push @list, buildToHash($_) foreach @builds; - $c->stash->{'plain'} = { - data => scalar (JSON::Any->objToJson(\@list)) + $c->stash->{'plain'} = { + data => scalar (JSON::Any->objToJson(\@list)) }; $c->forward('Hydra::View::Plain'); } @@ -155,7 +155,7 @@ sub queue : Chained('api') PathPart('queue') Args(0) { sub nrqueue : Chained('api') PathPart('nrqueue') Args(0) { my ($self, $c) = @_; my $nrQueuedBuilds = $c->model('DB::Builds')->search({finished => 0})->count(); - $c->stash->{'plain'} = { + $c->stash->{'plain'} = { data => "$nrQueuedBuilds" }; $c->forward('Hydra::View::Plain'); @@ -176,7 +176,7 @@ sub nrbuilds : Chained('api') PathPart('nrbuilds') Args(0) { my ($self, $c) = @_; my $nr = $c->request->params->{nr}; my $period = $c->request->params->{period}; - + error($c, "Parameter not defined!") if !defined $nr || !defined $period; my $base; @@ -186,21 +186,21 @@ sub nrbuilds : Chained('api') PathPart('nrbuilds') Args(0) { my $system = $c->request->params->{system}; my $filter = {finished => 1}; - $filter->{project} = $project if ! $project eq ""; - $filter->{jobset} = $jobset if ! $jobset eq ""; - $filter->{job} = $job if !$job eq ""; - $filter->{system} = $system if !$system eq ""; + $filter->{project} = $project if ! $project eq ""; + $filter->{jobset} = $jobset if ! $jobset eq ""; + $filter->{job} = $job if !$job eq ""; + $filter->{system} = $system if !$system eq ""; $base = 60*60 if($period eq "hour"); $base = 24*60*60 if($period eq "day"); - + my @stats = $c->model('DB::Builds')->search($filter, {select => [{ count => "*" }], as => ["nr"], group_by => ["timestamp - timestamp % $base"], order_by => "timestamp - timestamp % $base DESC", rows => $nr}); my @arr; push @arr, int($_->get_column("nr")) foreach @stats; @arr = reverse(@arr); - - $c->stash->{'plain'} = { - data => scalar (JSON::Any->objToJson(\@arr)) + + $c->stash->{'plain'} = { + data => scalar (JSON::Any->objToJson(\@arr)) }; $c->forward('Hydra::View::Plain'); } diff --git a/src/lib/Hydra/Controller/Admin.pm b/src/lib/Hydra/Controller/Admin.pm index f71ffcc4..76a7d9cb 100644 --- a/src/lib/Hydra/Controller/Admin.pm +++ b/src/lib/Hydra/Controller/Admin.pm @@ -101,7 +101,7 @@ sub create_user : Chained('admin') PathPart('create-user') Args(0) { $c->stash->{template} = 'user.tt'; $c->stash->{edit} = 1; - $c->stash->{create} = 1; + $c->stash->{create} = 1; } sub create_user_submit : Chained('admin') PathPart('create-user/submit') Args(0) { @@ -160,7 +160,7 @@ sub user_edit_submit : Chained('user') PathPart('submit') Args(0) { updateUser($c, $c->stash->{user}); } }); - + $c->res->redirect("/admin/users"); } @@ -252,9 +252,9 @@ sub machine_edit_submit : Chained('machine') PathPart('submit') Args(0) { updateMachine($c, $c->stash->{machine}); } }); - + saveNixMachines($c); - + $c->res->redirect("/admin/machines"); } diff --git a/src/lib/Hydra/Controller/Job.pm b/src/lib/Hydra/Controller/Job.pm index eedadc23..48a7c08a 100644 --- a/src/lib/Hydra/Controller/Job.pm +++ b/src/lib/Hydra/Controller/Job.pm @@ -27,18 +27,18 @@ sub overview : Chained('job') PathPart('') Args(0) { $c->stash->{currentBuilds} = [$c->stash->{job}->builds->search({finished => 1, iscurrent => 1}, { order_by => 'system' })]; - $c->stash->{lastBuilds} = - [ $c->stash->{job}->builds->search({ finished => 1 }, + $c->stash->{lastBuilds} = + [ $c->stash->{job}->builds->search({ finished => 1 }, { order_by => 'timestamp DESC', rows => 10, columns => [@buildListColumns] }) ]; $c->stash->{runningBuilds} = [ $c->stash->{job}->builds->search( - { busy => 1 }, + { busy => 1 }, { join => ['project'] , order_by => ["priority DESC", "timestamp"] , '+select' => ['project.enabled'] - , '+as' => ['enabled'] - } + , '+as' => ['enabled'] + } ) ]; $c->stash->{systems} = [$c->stash->{job}->builds->search({iscurrent => 1}, {select => ["system"], distinct => 1})]; diff --git a/src/lib/Hydra/Controller/Jobset.pm b/src/lib/Hydra/Controller/Jobset.pm index e8e09efe..8655bea8 100644 --- a/src/lib/Hydra/Controller/Jobset.pm +++ b/src/lib/Hydra/Controller/Jobset.pm @@ -51,7 +51,7 @@ sub jobsetIndex { $c->stash->{evals} = getEvals($self, $c, 0, 5); - $c->stash->{systems} = + $c->stash->{systems} = [ $c->stash->{jobset}->builds->search({ iscurrent => 1 }, { select => ["system"], distinct => 1, order_by => "system" }) ]; # status per system @@ -332,9 +332,9 @@ sub clone_submit : Chained('jobset') PathPart('clone/submit') Args(0) { sub getEvals { my ($self, $c, $offset, $rows) = @_; - + my @evals = $c->stash->{jobset}->jobsetevals->search( - { hasnewbuilds => 1 }, + { hasnewbuilds => 1 }, { order_by => "id DESC", rows => $rows + 1, offset => $offset }); my @res = (); @@ -366,12 +366,12 @@ sub getEvals { foreach my $input (@{$curInputs}) { my $p = $prevInputsHash{$input->name}; push @changedInputs, $input - if !defined $p || ($input->revision || "") ne ($p->revision || "") || $input->type ne $p->type || ($input->uri || "") ne ($p->uri || "") || + if !defined $p || ($input->revision || "") ne ($p->revision || "") || $input->type ne $p->type || ($input->uri || "") ne ($p->uri || "") || ( defined $input->dependency && defined $p->dependency && $input->dependency->id ne $p->dependency->id); } $prevInputs = $curInputs; - my $e = + my $e = { eval => $cur , nrScheduled => $nrScheduled , nrSucceeded => $nrSucceeded @@ -382,7 +382,7 @@ sub getEvals { push @res, $e if $n < $rows; $prev = $e; } - + return [reverse @res]; } diff --git a/src/lib/Hydra/Controller/JobsetEval.pm b/src/lib/Hydra/Controller/JobsetEval.pm index 17705b59..b0807dc1 100644 --- a/src/lib/Hydra/Controller/JobsetEval.pm +++ b/src/lib/Hydra/Controller/JobsetEval.pm @@ -9,7 +9,7 @@ use Hydra::Helper::CatalystUtils; sub eval : Chained('/') PathPart('eval') CaptureArgs(1) { my ($self, $c, $evalId) = @_; - + my $eval = $c->model('DB::JobsetEvals')->find($evalId) or notFound($c, "Evaluation $evalId doesn't exist."); @@ -50,7 +50,7 @@ sub view : Chained('eval') PathPart('') Args(0) { } $c->stash->{otherEval} = $eval2 if defined $eval2; - + my @builds = $eval->builds->search({}, { order_by => ["job", "system", "id"], columns => [@buildListColumns] }); my @builds2 = defined $eval2 ? $eval2->builds->search({}, { order_by => ["job", "system", "id"], columns => [@buildListColumns] }) @@ -94,7 +94,7 @@ sub view : Chained('eval') PathPart('') Args(0) { } push @{$c->stash->{new}}, $build if !$found; } - + $c->stash->{full} = ($c->req->params->{full} || "0") eq "1"; } @@ -104,7 +104,7 @@ sub release : Chained('eval') PathPart('release') Args(0) { my $eval = $c->stash->{eval}; requireProjectOwner($c, $c->stash->{project}); - + my @builds = $eval->builds; my $releaseName; diff --git a/src/lib/Hydra/Controller/Project.pm b/src/lib/Hydra/Controller/Project.pm index 6eaca818..36556054 100644 --- a/src/lib/Hydra/Controller/Project.pm +++ b/src/lib/Hydra/Controller/Project.pm @@ -9,7 +9,7 @@ use Hydra::Helper::CatalystUtils; sub project : Chained('/') PathPart('project') CaptureArgs(1) { my ($self, $c, $projectName) = @_; - + my $project = $c->model('DB::Projects')->find($projectName) or notFound($c, "Project $projectName doesn't exist."); @@ -44,7 +44,7 @@ sub submit : Chained('project') PathPart Args(0) { requireProjectOwner($c, $c->stash->{project}); requirePost($c); - + if (($c->request->params->{submit} || "") eq "delete") { $c->stash->{project}->delete; $c->res->redirect($c->uri_for("/")); @@ -53,7 +53,7 @@ sub submit : Chained('project') PathPart Args(0) { txn_do($c->model('DB')->schema, sub { updateProject($c, $c->stash->{project}); }); - + $c->res->redirect($c->uri_for($self->action_for("view"), [$c->stash->{project}->name])); } @@ -62,11 +62,11 @@ sub hide : Chained('project') PathPart Args(0) { my ($self, $c) = @_; requireProjectOwner($c, $c->stash->{project}); - + txn_do($c->model('DB')->schema, sub { $c->stash->{project}->update({ hidden => 1, enabled => 0 }); }); - + $c->res->redirect($c->uri_for("/")); } @@ -75,18 +75,18 @@ sub unhide : Chained('project') PathPart Args(0) { my ($self, $c) = @_; requireProjectOwner($c, $c->stash->{project}); - + txn_do($c->model('DB')->schema, sub { $c->stash->{project}->update({ hidden => 0 }); }); - + $c->res->redirect($c->uri_for("/")); } sub requireMayCreateProjects { my ($c) = @_; - + requireLogin($c) if !$c->user_exists; error($c, "Only administrators or authorised users can perform this operation.") @@ -111,7 +111,7 @@ sub create_submit : Path('/create-project/submit') { requireMayCreateProjects($c); my $projectName = trim $c->request->params->{name}; - + error($c, "Invalid project name: ‘$projectName’") if $projectName !~ /^$projectNameRE$/; txn_do($c->model('DB')->schema, sub { @@ -124,7 +124,7 @@ sub create_submit : Path('/create-project/submit') { {name => $projectName, displayname => "", owner => $owner}); updateProject($c, $project); }); - + $c->res->redirect($c->uri_for($self->action_for("view"), [$projectName])); } @@ -133,7 +133,7 @@ sub create_jobset : Chained('project') PathPart('create-jobset') Args(0) { my ($self, $c) = @_; requireProjectOwner($c, $c->stash->{project}); - + $c->stash->{template} = 'jobset.tt'; $c->stash->{create} = 1; $c->stash->{edit} = 1; @@ -144,7 +144,7 @@ sub create_jobset_submit : Chained('project') PathPart('create-jobset/submit') A my ($self, $c) = @_; requireProjectOwner($c, $c->stash->{project}); - + my $jobsetName = trim $c->request->params->{name}; my $exprType = $c->request->params->{"nixexprpath"} =~ /.scm$/ ? "guile" : "nix"; @@ -158,7 +158,7 @@ sub create_jobset_submit : Chained('project') PathPart('create-jobset/submit') A {name => $jobsetName, nixexprinput => "", nixexprpath => "", emailoverride => ""}); Hydra::Controller::Jobset::updateJobset($c, $jobset); }); - + $c->res->redirect($c->uri_for($c->controller('Jobset')->action_for("index"), [$c->stash->{project}->name, $jobsetName])); } @@ -166,7 +166,7 @@ sub create_jobset_submit : Chained('project') PathPart('create-jobset/submit') A sub updateProject { my ($c, $project) = @_; - + my $owner = $project->owner; if ($c->check_user_roles('admin')) { $owner = trim $c->request->params->{owner}; @@ -176,7 +176,7 @@ sub updateProject { my $projectName = trim $c->request->params->{name}; error($c, "Invalid project name: ‘$projectName’") if $projectName !~ /^$projectNameRE$/; - + my $displayName = trim $c->request->params->{displayname}; error($c, "Invalid display name: $displayName") if $displayName eq ""; @@ -209,7 +209,7 @@ sub create_view_submit : Chained('project') PathPart('create-view/submit') Args( my ($self, $c) = @_; requireProjectOwner($c, $c->stash->{project}); - + my $viewName = $c->request->params->{name}; my $view; @@ -253,7 +253,7 @@ sub create_release : Chained('project') PathPart('create-release') Args(0) { sub create_release_submit : Chained('project') PathPart('create-release/submit') Args(0) { my ($self, $c) = @_; - + requireProjectOwner($c, $c->stash->{project}); my $releaseName = $c->request->params->{name}; diff --git a/src/lib/Hydra/Controller/Release.pm b/src/lib/Hydra/Controller/Release.pm index 89cb2103..322dd417 100644 --- a/src/lib/Hydra/Controller/Release.pm +++ b/src/lib/Hydra/Controller/Release.pm @@ -28,11 +28,11 @@ sub view : Chained('release') PathPart('') Args(0) { sub updateRelease { my ($c, $release) = @_; - + my $releaseName = trim $c->request->params->{name}; error($c, "Invalid release name: $releaseName") unless $releaseName =~ /^$relNameRE$/; - + $release->update( { name => $releaseName , description => trim $c->request->params->{description} @@ -59,7 +59,7 @@ sub edit : Chained('release') PathPart('edit') Args(0) { sub submit : Chained('release') PathPart('submit') Args(0) { my ($self, $c) = @_; - + requireProjectOwner($c, $c->stash->{project}); if (($c->request->params->{action} || "") eq "delete") { diff --git a/src/lib/Hydra/Controller/Root.pm b/src/lib/Hydra/Controller/Root.pm index d21d7ad9..a36c88bc 100644 --- a/src/lib/Hydra/Controller/Root.pm +++ b/src/lib/Hydra/Controller/Root.pm @@ -87,7 +87,7 @@ sub timeline :Local { $c->stash->{template} = 'timeline.tt'; $c->stash->{builds} = [ $c->model('DB::Builds')->search ( { finished => 1, stoptime => { '>' => $pit } } - , { order_by => ["starttime"] } + , { order_by => ["starttime"] } ) ]; } @@ -199,7 +199,7 @@ sub nar :Local :Args(1) { sub nix_cache_info :Path('nix-cache-info') :Args(0) { my ($self, $c) = @_; $c->response->content_type('text/plain'); - $c->stash->{'plain'} = { data => + $c->stash->{'plain'} = { data => #"StoreDir: $Nix::Config::storeDir\n" . # FIXME "StoreDir: /nix/store\n" . "WantMassQuery: 0\n" . diff --git a/src/lib/Hydra/Controller/View.pm b/src/lib/Hydra/Controller/View.pm index aa3789cc..b2186039 100644 --- a/src/lib/Hydra/Controller/View.pm +++ b/src/lib/Hydra/Controller/View.pm @@ -9,7 +9,7 @@ use Hydra::Helper::CatalystUtils; sub getView { my ($c, $projectName, $viewName) = @_; - + my $project = $c->model('DB::Projects')->find($projectName); notFound($c, "Project $projectName doesn't exist.") if !defined $project; $c->stash->{project} = $project; @@ -32,11 +32,11 @@ sub getView { sub updateView { my ($c, $view) = @_; - + my $viewName = trim $c->request->params->{name}; error($c, "Invalid view name: $viewName") unless $viewName =~ /^[[:alpha:]][\w\-]*$/; - + $view->update( { name => $viewName , description => trim $c->request->params->{description} }); @@ -61,7 +61,7 @@ sub updateView { # !!! We could check whether the job exists, but that would # require the evaluator to have seen the job, which may not be # the case. - + $view->viewjobs->create( { jobset => $jobsetName , job => $jobName @@ -112,7 +112,7 @@ sub edit : Chained('view') PathPart('edit') Args(0) { $c->stash->{template} = 'edit-view.tt'; } - + sub submit : Chained('view') PathPart('submit') Args(0) { my ($self, $c) = @_; requireProjectOwner($c, $c->stash->{project}); @@ -127,10 +127,10 @@ sub submit : Chained('view') PathPart('submit') Args(0) { $c->res->redirect($c->uri_for($self->action_for("view_view"), $c->req->captures)); } - + sub latest : Chained('view') PathPart('latest') { my ($self, $c, @args) = @_; - + # Redirect to the latest result in the view in which every build # is successful. my $latest = getLatestSuccessfulViewResult( @@ -142,7 +142,7 @@ sub latest : Chained('view') PathPart('latest') { sub latest_finished : Chained('view') PathPart('latest-finished') { my ($self, $c, @args) = @_; - + # Redirect to the latest result in the view in which every build # is successful *and* where the jobset evaluation has finished # completely. @@ -155,7 +155,7 @@ sub latest_finished : Chained('view') PathPart('latest-finished') { sub result : Chained('view') PathPart('') { my ($self, $c, $id, @args) = @_; - + $c->stash->{template} = 'view-result.tt'; # Note: we don't actually check whether $id is a primary build, @@ -206,9 +206,9 @@ sub result : Chained('view') PathPart('') { $c->res->redirect($c->uri_for($c->controller('JobsetEval')->action_for("view"), [$eval->id], @args[1..$#args], $c->req->params)); } - + # Provide a redirect to the specified job of this view result - # through `http://.../view/$project/$viewName/$viewResult/$jobName'. + # through `http://.../view/$project/$viewName/$viewResult/$jobName'. # Optionally, you can append `-$system' to the $jobName to get a # build for a specific platform. elsif (scalar @args != 0) { diff --git a/src/lib/Hydra/Helper/CatalystUtils.pm b/src/lib/Hydra/Helper/CatalystUtils.pm index 4eea93da..476150a1 100644 --- a/src/lib/Hydra/Helper/CatalystUtils.pm +++ b/src/lib/Hydra/Helper/CatalystUtils.pm @@ -39,9 +39,9 @@ sub getPreviousBuild { , project => $build->project->name , jobset => $build->jobset->name , job => $build->job->name - , 'me.id' => { '<' => $build->id } + , 'me.id' => { '<' => $build->id } }, {rows => 1, order_by => "me.id DESC"}); - + return $prevBuild; } @@ -56,9 +56,9 @@ sub getNextBuild { , project => $build->project->name , jobset => $build->jobset->name , job => $build->job->name - , 'me.id' => { '>' => $build->id } + , 'me.id' => { '>' => $build->id } }, {rows => 1, order_by => "me.id ASC"}); - + return $nextBuild; } @@ -74,27 +74,27 @@ sub getPreviousSuccessfulBuild { , jobset => $build->jobset->name , job => $build->job->name , buildstatus => 0 - , 'me.id' => { '<' => $build->id } + , 'me.id' => { '<' => $build->id } }, {rows => 1, order_by => "me.id DESC"}); - + return $prevBuild; } sub getBuildStats { my ($c, $builds) = @_; - + $c->stash->{finishedBuilds} = $builds->search({finished => 1}) || 0; - + $c->stash->{succeededBuilds} = $builds->search({finished => 1, buildStatus => 0}) || 0; - + $c->stash->{scheduledBuilds} = $builds->search({finished => 0}) || 0; - + $c->stash->{busyBuilds} = $builds->search({finished => 0, busy => 1}) || 0; my $res; $res = $builds->search({}, {select => {sum => 'stoptime - starttime'}, as => ['sum']})->first; - + $c->stash->{totalBuildTime} = defined ($res) ? $res->get_column('sum') : 0 ; } @@ -131,7 +131,7 @@ sub isProjectOwner { sub requireProjectOwner { my ($c, $project) = @_; - + requireLogin($c) if !$c->user_exists; error($c, "Only the project members or administrators can perform this operation.") @@ -150,7 +150,7 @@ sub requireAdmin { my ($c) = @_; requireLogin($c) if !$c->user_exists; - + error($c, "Only administrators can perform this operation.") unless isAdmin($c); } diff --git a/src/lib/Hydra/Schema/Builds.pm b/src/lib/Hydra/Schema/Builds.pm index 0c4a5777..a780573c 100644 --- a/src/lib/Hydra/Schema/Builds.pm +++ b/src/lib/Hydra/Schema/Builds.pm @@ -464,7 +464,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_one( "actualBuildStep", "Hydra::Schema::BuildSteps", - { 'foreign.outpath' => 'self.outpath' + { 'foreign.outpath' => 'self.outpath' , 'foreign.build' => 'self.id' }, ); @@ -480,7 +480,7 @@ sub makeSource { sub makeQueries { my ($name, $constraint) = @_; - + my $activeJobs = "(select distinct project, jobset, job, system from Builds where isCurrent = 1 $constraint)"; makeSource( @@ -489,11 +489,11 @@ sub makeQueries { <has_many( # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vHluB+s1FkpJBPWmpv+wUQ 1; -# End of lines loaded from '/home/rbvermaa/src/hydra/src/lib/Hydra/Schema/Users.pm' +# End of lines loaded from '/home/rbvermaa/src/hydra/src/lib/Hydra/Schema/Users.pm' # These lines were loaded from '/home/rbvermaa/src/hydra/src/lib/Hydra/Schema/Users.pm' found in @INC. # They are now part of the custom portion of this file # for you to hand-edit. If you do not either delete diff --git a/src/lib/Hydra/View/NARInfo.pm b/src/lib/Hydra/View/NARInfo.pm index fd363ebc..00dd6a68 100644 --- a/src/lib/Hydra/View/NARInfo.pm +++ b/src/lib/Hydra/View/NARInfo.pm @@ -9,7 +9,7 @@ sub process { my ($self, $c) = @_; my $storePath = $c->stash->{storePath}; - + $c->response->content_type('text/x-nix-narinfo'); # !!! check MIME type my ($deriver, $narHash, $time, $narSize, $refs) = queryPathInfo($storePath, 1); diff --git a/src/lib/Hydra/View/NixClosure.pm b/src/lib/Hydra/View/NixClosure.pm index bda483df..51376699 100644 --- a/src/lib/Hydra/View/NixClosure.pm +++ b/src/lib/Hydra/View/NixClosure.pm @@ -6,17 +6,17 @@ use IO::Pipe; sub process { my ($self, $c) = @_; - + $c->response->content_type('application/x-nix-export'); my @storePaths = @{$c->stash->{storePaths}}; my $fh = new IO::Handle; - + open $fh, "nix-store --export `nix-store -qR @storePaths` | gzip |"; $c->response->body($fh); - + return 1; } diff --git a/src/lib/Hydra/View/NixManifest.pm b/src/lib/Hydra/View/NixManifest.pm index 6c2ac9d1..3c27e69b 100644 --- a/src/lib/Hydra/View/NixManifest.pm +++ b/src/lib/Hydra/View/NixManifest.pm @@ -10,7 +10,7 @@ sub process { my ($self, $c) = @_; my @storePaths = @{$c->stash->{storePaths}}; - + $c->response->content_type('text/x-nix-manifest'); my @paths = computeFSClosure(0, 1, @storePaths); @@ -19,7 +19,7 @@ sub process { "version {\n" . " ManifestVersion: 4\n" . "}\n"; - + foreach my $path (@paths) { my ($deriver, $hash, $time, $narSize, $refs) = queryPathInfo($path, 0); @@ -30,7 +30,7 @@ sub process { $escaped =~ s/\+/%2b/g; $escaped =~ s/\=/%3d/g; $escaped =~ s/\?/%3f/g; - + my $url = $c->stash->{narBase} . "/" . $escaped; my $system = $c->stash->{systemForPath}->{$path}; diff --git a/src/lib/Hydra/View/NixNAR.pm b/src/lib/Hydra/View/NixNAR.pm index 49bb27b6..af1a5367 100644 --- a/src/lib/Hydra/View/NixNAR.pm +++ b/src/lib/Hydra/View/NixNAR.pm @@ -7,11 +7,11 @@ sub process { my ($self, $c) = @_; my $storePath = $c->stash->{storePath}; - + $c->response->content_type('application/x-nix-archive'); # !!! check MIME type my $fh = new IO::Handle; - + open $fh, "nix-store --dump '$storePath' | bzip2 |"; $c->response->body($fh); diff --git a/src/lib/Hydra/View/NixPkg.pm b/src/lib/Hydra/View/NixPkg.pm index 945a0b82..5631de2c 100644 --- a/src/lib/Hydra/View/NixPkg.pm +++ b/src/lib/Hydra/View/NixPkg.pm @@ -14,7 +14,7 @@ sub process { . " " . $build->nixname . " " . $build->system . " " . $build->drvpath . " " . $build->outpath . " " . $c->uri_for('/'); - + $c->response->body($s); return 1; diff --git a/src/root/build.tt b/src/root/build.tt index 058b4ced..1176e6af 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -9,57 +9,57 @@ [% job = build.job %] [% BLOCK renderBuildSteps %] - - - - - - [% FOREACH step IN build.buildsteps -%] - [% IF ( type == "All" ) || ( type == "Failed" && step.status != 0 ) || ( type == "Running" && step.busy == 1 ) -%] - [% log = c.uri_for('/build' build.id 'nixlog' step.stepnr) %] - - - - +
NrWhatDurationMachineStatus
[% step.stepnr %] - [% IF step.type == 0 %] - Build of [% step.outpath %] - [% ELSE %] - Substitution of [% step.outpath %] - [% END %] - - [% IF step.busy == 0 %] - [% INCLUDE renderDuration duration = step.stoptime - step.starttime %] - [% ELSE %] - [% IF build.finished %] - [% INCLUDE renderDuration duration = build.stoptime - step.starttime %] - [% ELSE %] - [% INCLUDE renderDuration duration = curTime - step.starttime %] - [% END %] - [% END %] -
+ + + + + [% FOREACH step IN build.buildsteps -%] + [% IF ( type == "All" ) || ( type == "Failed" && step.status != 0 ) || ( type == "Running" && step.busy == 1 ) -%] + [% log = c.uri_for('/build' build.id 'nixlog' step.stepnr) %] + + + + - - - [% END %] - [% END %] - -
NrWhatDurationMachineStatus
[% step.stepnr %] + [% IF step.type == 0 %] + Build of [% step.outpath %] + [% ELSE %] + Substitution of [% step.outpath %] + [% END %] + + [% IF step.busy == 0 %] + [% INCLUDE renderDuration duration = step.stoptime - step.starttime %] + [% ELSE %] + [% IF build.finished %] + [% INCLUDE renderDuration duration = build.stoptime - step.starttime %] + [% ELSE %] + [% INCLUDE renderDuration duration = curTime - step.starttime %] + [% END %] + [% END %] + [% step.machine.split('@').1 %] - [% IF step.busy == 1 %] - [% IF build.finished %] - Aborted - [% ELSE %] - Building - [% END %] - [% ELSIF step.status == 0 %] - Succeeded - [% ELSE %] - Failed: [% HTML.escape(step.errormsg) %] - [% END %] - [% IF step.logfile %] - (log, raw, tail) - [% END %] -
+ + [% IF step.busy == 1 %] + [% IF build.finished %] + Aborted + [% ELSE %] + Building + [% END %] + [% ELSIF step.status == 0 %] + Succeeded + [% ELSE %] + Failed: [% HTML.escape(step.errormsg) %] + [% END %] + [% IF step.logfile %] + (log, raw, tail) + [% END %] + + + [% END %] + [% END %] + + [% END %] @@ -68,79 +68,79 @@

[% flashMsg %]

[% END %] -
-
+
- - - - - -
- [% INCLUDE renderBuildStatusIcon size=128, build=build %] - - - - - - - [% IF build.releasename %] - - - - - [% ELSE %] - - - - - [% END %] - - - - - - - - - [% IF build.finished %] - - - - - [% END %] - [% IF build.logfile %] - - - - - [% END %] -
Build ID:[% build.id %]
Release name:[% HTML.escape(build.releasename) %]
Nix name:[% build.nixname %]
Status: - [% INCLUDE renderStatus build=build %] -
System:[% build.system %]
Duration: - [% IF build.iscachedbuild %] - (cached[% IF cachedBuild %] from [% INCLUDE renderFullBuildLink build=cachedBuild %][% END %]) - [% ELSE %] - [% INCLUDE renderDuration duration = build.stoptime - build.starttime %] finished at [% INCLUDE renderDateTime timestamp = build.stoptime %] - [% END %] -
Logfile: - pretty - raw - tail -
-
- - [% IF c.user_exists && available %] -
+ + + + + +
+ [% INCLUDE renderBuildStatusIcon size=128, build=build %] + + + + + + + [% IF build.releasename %] + + + + + [% ELSE %] + + + + + [% END %] + + + + + + + + + [% IF build.finished %] + + + + + [% END %] + [% IF build.logfile %] + + + + + [% END %] +
Build ID:[% build.id %]
Release name:[% HTML.escape(build.releasename) %]
Nix name:[% build.nixname %]
Status: + [% INCLUDE renderStatus build=build %] +
System:[% build.system %]
Duration: + [% IF build.iscachedbuild %] + (cached[% IF cachedBuild %] from [% INCLUDE renderFullBuildLink build=cachedBuild %][% END %]) + [% ELSE %] + [% INCLUDE renderDuration duration = build.stoptime - build.starttime %] finished at [% INCLUDE renderDateTime timestamp = build.stoptime %] + [% END %] +
Logfile: + pretty + raw + tail +
+
+ + [% IF c.user_exists && available %] +
@@ -148,31 +148,31 @@
-
- [% END %] - - [% IF build.buildproducts %] + + [% END %] -

Build products

- - [% IF !available %] -

Note: this build is no longer available.

- [% END %] - - [% INCLUDE renderProductList latestRoot=['/job' build.project.name build.jobset.name build.job.name 'latest'] %] - - [% END %] + [% IF build.buildproducts %] + +

Build products

+ + [% IF !available %] +

Note: this build is no longer available.

+ [% END %] + + [% INCLUDE renderProductList latestRoot=['/job' build.project.name build.jobset.name build.job.name 'latest'] %] + + [% END %] [% IF !build.finished %]

Running build steps

[% INCLUDE renderBuildSteps type="Running" %] - [% END %] + [% END %] - [% IF build.finished %] - [% IF build.buildsteps && build.buildstatus != 0 && build.buildstatus != 6 %] + [% IF build.finished %] + [% IF build.buildsteps && build.buildstatus != 0 && build.buildstatus != 6 %]

Failed build steps

- [% INCLUDE renderBuildSteps type="Failed" %] - [% END %] + [% INCLUDE renderBuildSteps type="Failed" %] + [% END %] [% IF prevSuccessfulBuild %]

Changes

@@ -192,7 +192,7 @@ [% INCLUDE renderBuildStatusIcon build=prevSuccessfulBuild size=32 %] [% INCLUDE renderFullBuildLink build=prevSuccessfulBuild, hideProjectName=1, hideJobsetName=1 %] [% IF prevSuccessfulBuild && firstBrokenBuild && firstBrokenBuild.id != build.id %][% INCLUDE renderBuildStatusIcon build=firstBrokenBuild size=32 %] [% INCLUDE renderFullBuildLink build=firstBrokenBuild, hideProjectName=1, hideJobsetName=1 %][% END %] [% INCLUDE renderBuildStatusIcon build=build size=32 %] [% INCLUDE renderFullBuildLink build=build, hideProjectName=1, hideJobsetName=1 %] - + [% IF prevSuccessfulBuild && firstBrokenBuild && firstBrokenBuild.id != build.id %][% INCLUDE renderInputDiff build1=prevSuccessfulBuild , build2=firstBrokenBuild %][% END %] @@ -201,207 +201,207 @@ [% END %] - [% IF build.errormsg && build.buildstatus != 5 %] - -

Nix error output

- -
[% HTML.escape(build.errormsg) -%]
- [% END %] - [% END %] - [% IF logtext %] -

Log

- -
[% HTML.escape(logtext) -%]
- [% END %] -
-
+ [% IF build.errormsg && build.buildstatus != 5 %] -

Information

- - - - - - - - - - - - - - - - - - - - - - - [% IF build.nixexprinput %] - - - - - [% END %] - - - - - [% IF build.releasename %] - - - - - [% END %] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [% IF pathHash %] - - - - +

Nix error output

+ +
[% HTML.escape(build.errormsg) -%]
+ [% END %] + [% END %] + [% IF logtext %] +

Log

+ +
[% HTML.escape(logtext) -%]
+ [% END %] + +
+ +

Information

+ +
Build ID:[% build.id %]
Status: - [% INCLUDE renderStatus build=build %] -
Project:[% INCLUDE renderProjectName project=project.name %]
Jobset:[% INCLUDE renderJobsetName project=project.name jobset=jobset.name %]
Job name:[% INCLUDE renderJobName project=project.name jobset=jobset.name job=job.name %]
Nix expression:file [% HTML.escape(build.nixexprpath) %] in input [% HTML.escape(build.nixexprinput) %]
Nix name:[% build.nixname %]
Release name:[% HTML.escape(build.releasename) %]
Short description:[% IF build.description %][% HTML.escape(build.description) %][% ELSE %](not given)[% END %]
Long description:[% IF build.longdescription %][% HTML.escape(build.longdescription) %][% ELSE %](not given)[% END %]
License:[% IF build.license %][% HTML.escape(build.license) %][% ELSE %](not given)[% END %]
Homepage:[% IF build.homepage %] build.homepage) %]>[% HTML.escape(build.homepage) %][% ELSE %](not given)[% END %]
Maintainer(s):[% IF build.maintainers %][% HTML.escape(build.maintainers) %][% ELSE %](not given)[% END %]
System:[% build.system %]
Max silent / timeout:[% build.maxsilent %]s / [% build.timeout %]s
Derivation store path: - [% build.drvpath %] - [% IF drvAvailable %] - (build-time dependencies) - [% END %] -
Output store path: - [% build.outpath %] - [% IF available %] - (runtime dependencies) - [% END %] -
Output store path hash: - [% pathHash %] -
+ + + + + + + + + + + + + + + + + + + + + [% IF build.nixexprinput %] + + + + [% END %] - - - - - [% IF build.finished && build.buildstatus != 4 %] - [% IF build.iscachedbuild && cachedBuild %] - - - - - [% END %] - - - - - - - - - - - - - - [% IF build.logfile %] - - - - - [% END %] - [% END %] - [% IF !build.finished %] - - - - - [% END %] - [% IF build.finished && build.buildproducts %] - - - - - [% END %] -
Build ID:[% build.id %]
Status: + [% INCLUDE renderStatus build=build %] +
Project:[% INCLUDE renderProjectName project=project.name %]
Jobset:[% INCLUDE renderJobsetName project=project.name jobset=jobset.name %]
Job name:[% INCLUDE renderJobName project=project.name jobset=jobset.name job=job.name %]
Nix expression:file [% HTML.escape(build.nixexprpath) %] in input [% HTML.escape(build.nixexprinput) %]
Time added:[% INCLUDE renderDateTime timestamp = build.timestamp %]
Cached build:[% INCLUDE renderFullBuildLink build=cachedBuild %]
Build started:[% IF build.starttime %][% INCLUDE renderDateTime timestamp = build.starttime %][% ELSE %](cached build)[% END %]
Build finished:[% IF build.stoptime %][% INCLUDE renderDateTime timestamp = build.stoptime %][% ELSE %](cached build)[% END %]
Duration: - [% IF build.iscachedbuild %] - (cached build) - [% ELSE %] - [% INCLUDE renderDuration duration = build.stoptime - build.starttime %] - [% END %] -
Logfile: - Available - (raw, - tail) -
Priority:[% build.priority %]
Availability: - [% IF !available %] - Build output is no longer available - [% ELSIF build.keep %] - Build output will be kept permanently - [% ELSE %] - Build output is available, but may be garbage-collected - [% END %] -
-
-
- -

Build inputs

- - - - - - - [% FOREACH input IN build.inputs -%] - - - - - - - - [% END -%] - -
NameTypeValueRevisionStore path
[% input.name %][% type = input.type; inputTypes.$type %] - [% IF input.type == "build" || input.type == "sysbuild" %] - [% INCLUDE renderFullBuildLink build=input.dependency %] - [% ELSIF input.type == "string" || input.type == "boolean" %] - "[% input.value %]" - [% ELSE %] - [% input.uri %] - [% END %] - [% IF input.revision %][% input.revision %][% END %][% input.path %]
+ + Nix name: + [% build.nixname %] + + [% IF build.releasename %] + + Release name: + [% HTML.escape(build.releasename) %] + + [% END %] + + Short description: + [% IF build.description %][% HTML.escape(build.description) %][% ELSE %](not given)[% END %] + + + Long description: + [% IF build.longdescription %][% HTML.escape(build.longdescription) %][% ELSE %](not given)[% END %] + + + License: + [% IF build.license %][% HTML.escape(build.license) %][% ELSE %](not given)[% END %] + + + Homepage: + [% IF build.homepage %] build.homepage) %]>[% HTML.escape(build.homepage) %][% ELSE %](not given)[% END %] + + + Maintainer(s): + [% IF build.maintainers %][% HTML.escape(build.maintainers) %][% ELSE %](not given)[% END %] + + + System: + [% build.system %] + + + Max silent / timeout: + [% build.maxsilent %]s / [% build.timeout %]s + + + Derivation store path: + + [% build.drvpath %] + [% IF drvAvailable %] + (build-time dependencies) + [% END %] + + + + Output store path: + + [% build.outpath %] + [% IF available %] + (runtime dependencies) + [% END %] + + + [% IF pathHash %] + + Output store path hash: + + [% pathHash %] + + + [% END %] + + Time added: + [% INCLUDE renderDateTime timestamp = build.timestamp %] + + [% IF build.finished && build.buildstatus != 4 %] + [% IF build.iscachedbuild && cachedBuild %] + + Cached build: + [% INCLUDE renderFullBuildLink build=cachedBuild %] + + [% END %] + + + Build started: + [% IF build.starttime %][% INCLUDE renderDateTime timestamp = build.starttime %][% ELSE %](cached build)[% END %] + + + Build finished: + [% IF build.stoptime %][% INCLUDE renderDateTime timestamp = build.stoptime %][% ELSE %](cached build)[% END %] + + + Duration: + + [% IF build.iscachedbuild %] + (cached build) + [% ELSE %] + [% INCLUDE renderDuration duration = build.stoptime - build.starttime %] + [% END %] + + + [% IF build.logfile %] + + Logfile: + + Available + (raw, + tail) + + + [% END %] + [% END %] + [% IF !build.finished %] + + Priority: + [% build.priority %] + + [% END %] + [% IF build.finished && build.buildproducts %] + + Availability: + + [% IF !available %] + Build output is no longer available + [% ELSIF build.keep %] + Build output will be kept permanently + [% ELSE %] + Build output is available, but may be garbage-collected + [% END %] + + + [% END %] + +
+
+ +

Build inputs

+ + + + + + + [% FOREACH input IN build.inputs -%] + + + + + + + + [% END -%] + +
NameTypeValueRevisionStore path
[% input.name %][% type = input.type; inputTypes.$type %] + [% IF input.type == "build" || input.type == "sysbuild" %] + [% INCLUDE renderFullBuildLink build=input.dependency %] + [% ELSIF input.type == "string" || input.type == "boolean" %] + "[% input.value %]" + [% ELSE %] + [% input.uri %] + [% END %] + [% IF input.revision %][% input.revision %][% END %][% input.path %]

@@ -409,15 +409,15 @@

Changes since previous build : [% INCLUDE renderFullBuildLink build=prevBuild, hideProjectName=1, hideJobsetName=1 %]

[% INCLUDE renderInputDiff build2=build , build1=prevBuild %] [% END %] - -
+ +
[% IF relatedbuilds %] -
-

Related builds

-

The following builds are part of the same jobset evaluation that produced this build.

- [% INCLUDE renderBuildList builds=relatedbuilds hideProjectName=1 hideJobsetName=1 %] -
+
+

Related builds

+

The following builds are part of the same jobset evaluation that produced this build.

+ [% INCLUDE renderBuildList builds=relatedbuilds hideProjectName=1 hideJobsetName=1 %] +
[% END %] [% IF build.buildsteps %] @@ -426,37 +426,37 @@ [% INCLUDE renderBuildSteps type="All" %]
[% END %] - + [% IF build.dependents %]
-

Used by

- -

The following builds have used this build as an input:

- - - - - - - [% FOREACH input IN build.dependents -%] - - - - - - - [% END -%] - -
BuildInput nameSystemTimestamp
[% INCLUDE renderFullBuildLink build=input.build %][% input.name %][% input.build.system %][% INCLUDE renderDateTime timestamp = input.build.timestamp %]
+

Used by

+ +

The following builds have used this build as an input:

+ + + + + + + [% FOREACH input IN build.dependents -%] + + + + + + + [% END -%] + +
BuildInput nameSystemTimestamp
[% INCLUDE renderFullBuildLink build=input.build %][% input.name %][% input.build.system %][% INCLUDE renderDateTime timestamp = input.build.timestamp %]
[% END %] [% IF prevBuilds %]

Build time history (in seconds)

-
-
+
+
@@ -467,7 +467,7 @@ [% FOREACH prevbuild IN prevBuilds %][% IF prevbuild.build.starttime != 0 %] d.push([[% prevbuild.starttime * 1000 %],[% prevbuild.get_column('actualBuildTime') %]]); ids[[% prevbuild.starttime * 1000 %]] = [% prevbuild.id %] ; - [% END %][% END %] + [% END %][% END %] var options = { xaxis: { mode: "time" }, @@ -481,10 +481,10 @@ hoverRadius: 4, }, }; - + var plot = $.plot($("#placeholder"), [d], options); - + var overview = $.plot($("#overview"), [d], { series: { lines: { show: true, lineWidth: 1 }, @@ -494,20 +494,20 @@ yaxis: { ticks: [], min: 0, autoscaleMargin: 0.1 }, selection: { mode: "x" } }); - + // now connect the two - + $("#placeholder").bind("plotselected", function (event, ranges) { // do the zooming plot = $.plot($("#placeholder"), [d], $.extend(true, {}, options, { xaxis: { min: ranges.xaxis.from, max: ranges.xaxis.to } })); - + // don't fire event on the overview to prevent eternal loop overview.setSelection(ranges, true); }); - + $("#overview").bind("plotselected", function (event, ranges) { plot.setSelection(ranges); }); @@ -517,15 +517,15 @@ plot.highlight(item.series, item.datapoint); buildid = ids[item.datapoint[0]]; window.location = "/build/"+buildid; - } - }); + } + }); });

Store path size history (in MB)

-
-
+
+
- +
[% END %] diff --git a/src/root/channel-contents.tt b/src/root/channel-contents.tt index 0f0387e2..12e4b01e 100644 --- a/src/root/channel-contents.tt +++ b/src/root/channel-contents.tt @@ -21,7 +21,7 @@ $ nix-env -i foo

You can update to the latest versions of the packages in this channel by executing

-$ nix-channel --update 
+$ nix-channel --update
 $ nix-env -u '*'

Alternatively, if you have associated the @@ -35,7 +35,7 @@ install the package simply by clicking on the packages below.

This channel contains the following packages.

- + @@ -44,7 +44,7 @@ install the package simply by clicking on the packages below.

- + [% odd = 0 %] @@ -69,9 +69,9 @@ install the package simply by clicking on the packages below.

[% END %] - + - +
# Description
diff --git a/src/root/clone-build.tt b/src/root/clone-build.tt index 44b6ccb7..7dde7a49 100644 --- a/src/root/clone-build.tt +++ b/src/root/clone-build.tt @@ -45,7 +45,7 @@ [% END -%] - +

diff --git a/src/root/clone-jobset.tt b/src/root/clone-jobset.tt index 209c52c7..1f7a46e6 100644 --- a/src/root/clone-jobset.tt +++ b/src/root/clone-jobset.tt @@ -8,7 +8,7 @@

Cloning jobset [% jobset.project.name %]:[% jobset.name %]

Name "") %] /> -

+

diff --git a/src/root/common.tt b/src/root/common.tt index d0fcfe62..e598985f 100644 --- a/src/root/common.tt +++ b/src/root/common.tt @@ -93,7 +93,7 @@ [%- BLOCK renderBuildListBody -%] [%- odd = 0 -%] [%- FOREACH build IN builds -%] - build [% build.id %][% -%] [% END %] @@ -252,7 +252,7 @@ Failed (with result) [%- ELSE -%] Failed - [%- END -%] + [%- END -%] [%- ELSIF busy -%] Busy [%- ELSE -%] @@ -260,7 +260,7 @@ [%- END -%] [%- END -%] -[% BLOCK renderStatus %] +[% BLOCK renderStatus %] [% IF build.finished %] [% buildstatus = build.buildstatus %] [% INCLUDE renderBuildStatusIcon size=16 %] @@ -279,13 +279,13 @@ [% ELSE %] Build failed (see below) - [% END %] + [% END %] [% ELSIF build.busy %] Build in progress since [% INCLUDE renderDateTime timestamp = build.starttime %] [% ELSE %] Scheduled to be built - [% END %] + [% END %] [% END -%] [% BLOCK renderInputValue %] @@ -366,10 +366,10 @@ [% INCLUDE renderInputDiff build1=bi1.dependency, build2=bi2.dependency, nestedDiff=1, nestLevel=nestLevel+1 %] [% END %] - [% ELSE %] + [% ELSE %] [% bi1.name %]Changed input type from '[% type = bi1.type; inputTypes.$type %]' to '[% type = bi2.type; inputTypes.$type %]' [% END %] - + [% deletedInput = 0 %] [% END %] [% END %] @@ -439,7 +439,7 @@ - [%- FOREACH e IN evals; eval = e.eval; + [%- FOREACH e IN evals; eval = e.eval; link = c.uri_for(c.controller('JobsetEval').action_for('view'), [eval.id]) -%] [% eval.id %]  @@ -456,16 +456,16 @@ [% e.nrSucceeded %] [% e.nrFailed %] - [% IF e.nrScheduled > 0 %] - [% e.nrScheduled %] - [% END %] + [% IF e.nrScheduled > 0 %] + [% e.nrScheduled %] + [% END %] - [%- IF e.diff > 0 -%] - +[% e.diff %] - [%- ELSIF e.diff < 0 && e.nrScheduled == 0 -%] - [% e.diff %] - [%- END -%] + [%- IF e.diff > 0 -%] + +[% e.diff %] + [%- ELSIF e.diff < 0 && e.nrScheduled == 0 -%] + [% e.diff %] + [%- END -%] [%- END -%] diff --git a/src/root/deps.tt b/src/root/deps.tt index 0e56f04a..8ab580d6 100644 --- a/src/root/deps.tt +++ b/src/root/deps.tt @@ -12,7 +12,7 @@