* Give releases a timestamp.
This commit is contained in:
parent
5105d15636
commit
4f2b47bb0e
|
@ -228,6 +228,10 @@ sub getRelease {
|
||||||
my @jobs = ();
|
my @jobs = ();
|
||||||
|
|
||||||
my $status = 0; # = okay
|
my $status = 0; # = okay
|
||||||
|
|
||||||
|
# The timestamp of the release is the highest timestamp of all
|
||||||
|
# constitutent builds.
|
||||||
|
my $timestamp = 0;
|
||||||
|
|
||||||
foreach my $job (@{$c->stash->{jobs}}) {
|
foreach my $job (@{$c->stash->{jobs}}) {
|
||||||
my $thisBuild;
|
my $thisBuild;
|
||||||
|
@ -254,6 +258,9 @@ sub getRelease {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$timestamp = $thisBuild->timestamp
|
||||||
|
if defined $thisBuild && $thisBuild->timestamp > $timestamp;
|
||||||
|
|
||||||
push @jobs, { build => $thisBuild, job => $job };
|
push @jobs, { build => $thisBuild, job => $job };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,6 +269,7 @@ sub getRelease {
|
||||||
, releasename => $primaryBuild->get_column('releasename')
|
, releasename => $primaryBuild->get_column('releasename')
|
||||||
, jobs => [@jobs]
|
, jobs => [@jobs]
|
||||||
, status => $status
|
, status => $status
|
||||||
|
, timestamp => $timestamp
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
<th></th>
|
<th></th>
|
||||||
<th>#</th>
|
<th>#</th>
|
||||||
<th>Release</th>
|
<th>Release</th>
|
||||||
|
<th>Date</th>
|
||||||
[% FOREACH job IN jobs %]
|
[% FOREACH job IN jobs %]
|
||||||
<th class="releaseSetJobName">[% PROCESS renderReleaseJobName %]</th>
|
<th class="releaseSetJobName">[% PROCESS renderReleaseJobName %]</th>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
@ -39,6 +40,7 @@
|
||||||
<em>No name</em>
|
<em>No name</em>
|
||||||
[% END %]
|
[% END %]
|
||||||
</td>
|
</td>
|
||||||
|
<td>[% INCLUDE renderDateTime timestamp=release.timestamp %]</td>
|
||||||
[% FOREACH job IN release.jobs %]
|
[% FOREACH job IN release.jobs %]
|
||||||
<td class="centered">
|
<td class="centered">
|
||||||
[% IF job.build %]
|
[% IF job.build %]
|
||||||
|
|
|
@ -297,11 +297,11 @@ create trigger cascadeUserDelete
|
||||||
-- consists of, namely: a release consists of a build of some
|
-- consists of, namely: a release consists of a build of some
|
||||||
-- "primary" job, plus all builds of the other jobs named in
|
-- "primary" job, plus all builds of the other jobs named in
|
||||||
-- ReleaseSetJobs that have that build as an input. If there are
|
-- ReleaseSetJobs that have that build as an input. If there are
|
||||||
-- multiple builds matching a ReleaseSetJob, then we take the *oldest*
|
-- multiple builds matching a ReleaseSetJob, then we take the oldest
|
||||||
-- successful build (for release stability), or the *newest*
|
-- successful build, or the oldest unsuccessful build if there is no
|
||||||
-- unsuccessful build if there is no succesful build. A release is
|
-- successful build. A release is itself considered successful if all
|
||||||
-- itself considered successful if all builds (except those for jobs
|
-- builds (except those for jobs that have mayFail set) are
|
||||||
-- that have mayFail set) are successful.
|
-- successful.
|
||||||
--
|
--
|
||||||
-- Note that individual releases aren't separately stored in the
|
-- Note that individual releases aren't separately stored in the
|
||||||
-- database, so they're really just a dynamic view on the universe of
|
-- database, so they're really just a dynamic view on the universe of
|
||||||
|
|
Loading…
Reference in a new issue