* Give releases a timestamp.

This commit is contained in:
Eelco Dolstra 2008-11-30 00:23:33 +00:00
parent 5105d15636
commit 4f2b47bb0e
3 changed files with 15 additions and 5 deletions

View file

@ -229,6 +229,10 @@ sub getRelease {
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}}) {
my $thisBuild;
@ -254,6 +258,9 @@ sub getRelease {
}
}
$timestamp = $thisBuild->timestamp
if defined $thisBuild && $thisBuild->timestamp > $timestamp;
push @jobs, { build => $thisBuild, job => $job };
}
@ -262,6 +269,7 @@ sub getRelease {
, releasename => $primaryBuild->get_column('releasename')
, jobs => [@jobs]
, status => $status
, timestamp => $timestamp
};
}

View file

@ -12,6 +12,7 @@
<th></th>
<th>#</th>
<th>Release</th>
<th>Date</th>
[% FOREACH job IN jobs %]
<th class="releaseSetJobName">[% PROCESS renderReleaseJobName %]</th>
[% END %]
@ -39,6 +40,7 @@
<em>No name</em>
[% END %]
</td>
<td>[% INCLUDE renderDateTime timestamp=release.timestamp %]</td>
[% FOREACH job IN release.jobs %]
<td class="centered">
[% IF job.build %]

View file

@ -297,11 +297,11 @@ create trigger cascadeUserDelete
-- consists of, namely: a release consists of a build of some
-- "primary" job, plus all builds of the other jobs named in
-- ReleaseSetJobs that have that build as an input. If there are
-- multiple builds matching a ReleaseSetJob, then we take the *oldest*
-- successful build (for release stability), or the *newest*
-- unsuccessful build if there is no succesful build. A release is
-- itself considered successful if all builds (except those for jobs
-- that have mayFail set) are successful.
-- multiple builds matching a ReleaseSetJob, then we take the oldest
-- successful build, or the oldest unsuccessful build if there is no
-- successful build. A release is itself considered successful if all
-- builds (except those for jobs that have mayFail set) are
-- successful.
--
-- Note that individual releases aren't separately stored in the
-- database, so they're really just a dynamic view on the universe of