forked from lix-project/hydra
* Adding persistant releases. A release is a named set of builds.
This commit is contained in:
parent
a835bb532f
commit
929cbe7b7c
|
@ -95,7 +95,6 @@
|
|||
|
||||
# Releases -> Views.
|
||||
alter table ReleaseSets rename to Views;
|
||||
alter table Views rename column name to view_;
|
||||
alter table ReleaseSetJobs rename to ViewJobs;
|
||||
alter table ViewJobs rename column release_ to view_;
|
||||
alter table ViewJobs drop column mayFail;
|
||||
|
@ -129,8 +128,6 @@
|
|||
|
||||
select * from (select project, jobset, job, system, max(timestamp) timestamp from builds where finished = 1 group by project, jobset, job, system) natural join builds;
|
||||
|
||||
* nix-env -f . -u --leq sqlite perl-Catalyst-Engine-HTTP-Prefork perl-Catalyst-View-Download perl-DBD-SQLite perl-IO-Compress-Bzip2 perl-IPC-Run perl-Task-Catalyst-Tutorial perl-XML-Simple
|
||||
|
||||
|
||||
* Delete all scheduled builds that are not already building:
|
||||
|
||||
|
|
|
@ -210,4 +210,17 @@ sub create_view : Chained('project') PathPart('create-view') Args(0) {
|
|||
}
|
||||
|
||||
|
||||
sub releases : Chained('project') PathPart('releases') Args(0) {
|
||||
my ($self, $c) = @_;
|
||||
$c->stash->{template} = 'releases.tt';
|
||||
$c->stash->{releases} = [$c->stash->{project}->releases->all];
|
||||
}
|
||||
|
||||
|
||||
sub create_release : Chained('project') PathPart('releases/create') {
|
||||
my ($self, $c) = @_;
|
||||
$c->stash->{template} = 'create-release.tt';
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
|
|
@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema';
|
|||
__PACKAGE__->load_classes;
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Fs+amiko3zHOhK97IatSgQ
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yd1F1Xb8MbehV6bTP6wEGQ
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -103,8 +103,8 @@ __PACKAGE__->belongs_to(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7blxTiVkvfdukDiXCoD+Lw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IrEeOAeGZJUN3/kCMRNy5g
|
||||
|
||||
use Hydra::Helper::Nix;
|
||||
|
||||
|
|
|
@ -91,8 +91,8 @@ __PACKAGE__->set_primary_key("build", "productnr");
|
|||
__PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8wtm75jCRmcyWInKMO826g
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uVdvtQkCkZXqjpLhIB6OjQ
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -86,8 +86,8 @@ __PACKAGE__->set_primary_key("id");
|
|||
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3P0UuNHhdA8VfALMfwssTA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HbQGfeYtXVLhEofMmXgq9A
|
||||
|
||||
__PACKAGE__->belongs_to(
|
||||
"failedDep",
|
||||
|
|
|
@ -43,8 +43,8 @@ __PACKAGE__->set_primary_key("id");
|
|||
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:e4O2JqrJN8coHmRdjbbxHg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GoOrRB+LCSskU+/lEmhtGw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -91,7 +91,7 @@ __PACKAGE__->set_primary_key("build", "stepnr");
|
|||
__PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/Qdb8Y3Tqw7AOM5ique5Nw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:USyzZLDTSJrN+FJg29e/vA
|
||||
|
||||
1;
|
||||
|
|
|
@ -161,10 +161,15 @@ __PACKAGE__->has_many(
|
|||
"Hydra::Schema::BuildProducts",
|
||||
{ "foreign.build" => "self.id" },
|
||||
);
|
||||
__PACKAGE__->has_many(
|
||||
"releasemembers",
|
||||
"Hydra::Schema::ReleaseMembers",
|
||||
{ "foreign.build" => "self.id" },
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eJS7WCbSjwylQuAbQtB24w
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:otgQGRHBbSwp3Tb2UBW1Xg
|
||||
|
||||
use Hydra::Helper::Nix;
|
||||
|
||||
|
|
|
@ -47,8 +47,8 @@ __PACKAGE__->add_columns(
|
|||
__PACKAGE__->set_primary_key("srcpath", "sha256hash");
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FcLeNgdEr13JAYZLxF4/tw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:avORhqvcxFi5m+j9g9NYGg
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -40,8 +40,8 @@ __PACKAGE__->add_columns(
|
|||
__PACKAGE__->set_primary_key("uri", "revision");
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:y14yX+UAP03N7VGrgehcLw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:g3iZG160pb+oYl3LeM0duA
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -75,8 +75,8 @@ __PACKAGE__->has_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AjrYM1rAdgYy3j0+IFFUEw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SS2bc4Erxn0xyxeEndq88Q
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -69,8 +69,8 @@ __PACKAGE__->belongs_to(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:o5NC1PPpGrzOZZcumFoudg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ID6qQsHY59pmsJjfQKO07g
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -65,8 +65,8 @@ __PACKAGE__->has_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7A5UkNWAqy0XuhlKvOgr6Q
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TwiOYM2FLwu6Vo45BLPRAA
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -103,8 +103,8 @@ __PACKAGE__->has_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vaCDa6WBFdcLMG23Nlr27g
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EmQCVkqwPcbXYQg9g7vWpQ
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -74,10 +74,20 @@ __PACKAGE__->has_many(
|
|||
"Hydra::Schema::ViewJobs",
|
||||
{ "foreign.project" => "self.name" },
|
||||
);
|
||||
__PACKAGE__->has_many(
|
||||
"releases",
|
||||
"Hydra::Schema::Releases",
|
||||
{ "foreign.project" => "self.name" },
|
||||
);
|
||||
__PACKAGE__->has_many(
|
||||
"releasemembers",
|
||||
"Hydra::Schema::ReleaseMembers",
|
||||
{ "foreign.project" => "self.name" },
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XcrLhOH+WuO24UFulGft1w
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XnlHCaAVSobU9lrUhuViXQ
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -21,8 +21,8 @@ __PACKAGE__->add_columns(
|
|||
__PACKAGE__->set_primary_key("system");
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:X1voxjTNUQrn04o0zyVZ+w
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Qb9hjYs3pwR/hv9ds0lbuQ
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -28,8 +28,8 @@ __PACKAGE__->set_primary_key("username", "role");
|
|||
__PACKAGE__->belongs_to("username", "Hydra::Schema::Users", { username => "username" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hbm45HCbdLU4emCiCC5gyA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Jte1GUXzt62VhfWrdefJow
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -50,8 +50,8 @@ __PACKAGE__->has_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4Lj9iNcQhOG5VzUXkQFzkg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lcMVy+i3xmpHO4TYQYXG4Q
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -66,8 +66,8 @@ __PACKAGE__->belongs_to(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:63nUKTtC6XdTSawDvU+oFg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:new5Scb0JMcSyamjKPL2BA
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -42,8 +42,8 @@ __PACKAGE__->has_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+x+gzFpHSZzVMlsjMn47UA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 17:40:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HzIM+PxhyBLfCX6N5zFEIw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -48,6 +48,9 @@
|
|||
[% INCLUDE makeLink
|
||||
uri = c.uri_for(c.controller('Project').action_for('view'), [project.name])
|
||||
title = "Overview" %]
|
||||
[% INCLUDE makeLink
|
||||
uri = c.uri_for(c.controller('Project').action_for('releases'), [project.name])
|
||||
title = "Releases" %]
|
||||
[% INCLUDE makeLink
|
||||
uri = c.uri_for(c.controller('Project').action_for('all'), [project.name])
|
||||
title = "All builds" %]
|
||||
|
|
|
@ -98,7 +98,6 @@
|
|||
<a href="[% c.uri_for(c.controller('Project').action_for('create_jobset'), [project.name]) %]">[Create a new jobset]</a>
|
||||
|
||||
|
||||
|
||||
<h2>Views</h2>
|
||||
|
||||
[% IF views.size > 0 %]
|
||||
|
|
28
src/root/releases.tt
Normal file
28
src/root/releases.tt
Normal file
|
@ -0,0 +1,28 @@
|
|||
[% WRAPPER layout.tt title="Releases for Project ‘$project.name’" %]
|
||||
[% PROCESS common.tt %]
|
||||
[% USE HTML %]
|
||||
|
||||
<h1>Releases for Project <tt>[% project.name %]</tt></h1>
|
||||
|
||||
[% IF c.user_exists %]
|
||||
<p>
|
||||
[<a href="[% c.uri_for('/project' project.name 'releases' 'create') %]">Create a release</a>]
|
||||
</p>
|
||||
[% END %]
|
||||
|
||||
[% IF releases.size == 0 %]
|
||||
|
||||
<p><em>This project has no releases yet.</em></p>
|
||||
|
||||
[% ELSE %]
|
||||
|
||||
<ul>
|
||||
[% FOREACH release IN releases %]
|
||||
<li><tt>[% release.name %]</tt></li>
|
||||
[% END %]
|
||||
</ul>
|
||||
|
||||
[% END %]
|
||||
|
||||
|
||||
[% END %]
|
|
@ -344,6 +344,35 @@ create table ViewJobs (
|
|||
);
|
||||
|
||||
|
||||
-- A release is a named set of builds. The ReleaseMembers table lists
|
||||
-- the builds that constitute each release.
|
||||
create table Releases (
|
||||
project text not null,
|
||||
name text not null,
|
||||
|
||||
timestamp integer not null,
|
||||
|
||||
description text,
|
||||
|
||||
primary key (project, name),
|
||||
foreign key (project) references Projects(name) on delete cascade
|
||||
);
|
||||
|
||||
|
||||
create table ReleaseMembers (
|
||||
project text not null,
|
||||
release_ text not null,
|
||||
build integer not null,
|
||||
|
||||
description text,
|
||||
|
||||
primary key (project, release_, build),
|
||||
foreign key (project) references Projects(name) on delete cascade on update cascade,
|
||||
foreign key (project, release_) references Releases(project, name) on delete cascade on update cascade,
|
||||
foreign key (build) references Builds(id)
|
||||
);
|
||||
|
||||
|
||||
-- Some indices.
|
||||
create index IndexBuildInputsByBuild on BuildInputs(build);
|
||||
create index IndexBuildInputsByDependency on BuildInputs(dependency);
|
||||
|
|
Loading…
Reference in a new issue