* Renaming "release sets" to "views" (not finished yet). Having
releases as a dynamic view on the database was misguided, since doing thing like adding a new job to a release set will invalidate all old releases. So we rename release sets to views, and we'll reintroduce releases as separate, static entities in the database.
This commit is contained in:
@ -24,7 +24,7 @@ sub view : Chained('project') PathPart('') Args(0) {
|
||||
|
||||
getBuildStats($c, scalar $c->stash->{project}->builds);
|
||||
|
||||
$c->stash->{releaseSets} = [$c->stash->{project}->releasesets->all];
|
||||
$c->stash->{views} = [$c->stash->{project}->views->all];
|
||||
}
|
||||
|
||||
|
||||
|
@ -63,192 +63,6 @@ sub queue :Local {
|
||||
}
|
||||
|
||||
|
||||
sub getReleaseSet {
|
||||
my ($c, $projectName, $releaseSetName) = @_;
|
||||
|
||||
my $project = $c->model('DB::Projects')->find($projectName);
|
||||
notFound($c, "Project $projectName doesn't exist.") if !defined $project;
|
||||
$c->stash->{project} = $project;
|
||||
|
||||
(my $releaseSet) = $c->model('DB::ReleaseSets')->find($projectName, $releaseSetName);
|
||||
notFound($c, "Release set $releaseSetName doesn't exist.") if !defined $releaseSet;
|
||||
$c->stash->{releaseSet} = $releaseSet;
|
||||
|
||||
(my $primaryJob) = $releaseSet->releasesetjobs->search({isprimary => 1});
|
||||
#die "Release set $releaseSetName doesn't have a primary job." if !defined $primaryJob;
|
||||
|
||||
my $jobs = [$releaseSet->releasesetjobs->search({},
|
||||
{order_by => ["isprimary DESC", "job", "attrs"]})];
|
||||
|
||||
$c->stash->{jobs} = $jobs;
|
||||
|
||||
return ($project, $releaseSet, $primaryJob, $jobs);
|
||||
}
|
||||
|
||||
|
||||
sub updateReleaseSet {
|
||||
my ($c, $releaseSet) = @_;
|
||||
|
||||
my $releaseSetName = trim $c->request->params->{name};
|
||||
error($c, "Invalid release set name: $releaseSetName")
|
||||
unless $releaseSetName =~ /^[[:alpha:]][\w\-]*$/;
|
||||
|
||||
$releaseSet->update(
|
||||
{ name => $releaseSetName
|
||||
, description => trim $c->request->params->{description} });
|
||||
|
||||
$releaseSet->releasesetjobs->delete_all;
|
||||
|
||||
foreach my $param (keys %{$c->request->params}) {
|
||||
next unless $param =~ /^job-(\d+)-name$/;
|
||||
my $baseName = $1;
|
||||
|
||||
my $name = trim $c->request->params->{"job-$baseName-name"};
|
||||
my $description = trim $c->request->params->{"job-$baseName-description"};
|
||||
my $attrs = trim $c->request->params->{"job-$baseName-attrs"};
|
||||
|
||||
$name =~ /^([\w\-]+):([\w\-]+)$/ or error($c, "Invalid job name: $name");
|
||||
my $jobsetName = $1;
|
||||
my $jobName = $2;
|
||||
|
||||
error($c, "Jobset `$jobsetName' doesn't exist.")
|
||||
unless $releaseSet->project->jobsets->find({name => $jobsetName});
|
||||
|
||||
# !!! We could check whether the job exists, but that would
|
||||
# require the scheduler to have seen the job, which may not be
|
||||
# the case.
|
||||
|
||||
$releaseSet->releasesetjobs->create(
|
||||
{ jobset => $jobsetName
|
||||
, job => $jobName
|
||||
, description => $description
|
||||
, attrs => $attrs
|
||||
, isprimary => $c->request->params->{"primary"} eq $baseName ? 1 : 0
|
||||
});
|
||||
}
|
||||
|
||||
error($c, "There must be one primary job.")
|
||||
if $releaseSet->releasesetjobs->search({isprimary => 1})->count != 1;
|
||||
}
|
||||
|
||||
|
||||
sub releases :Local {
|
||||
my ($self, $c, $projectName, $releaseSetName, $subcommand) = @_;
|
||||
|
||||
my ($project, $releaseSet, $primaryJob, $jobs) = getReleaseSet($c, $projectName, $releaseSetName);
|
||||
|
||||
my $resultsPerPage = 10;
|
||||
my $page = 1;
|
||||
|
||||
if (defined $subcommand && $subcommand =~ /^\d+$/ ) {
|
||||
$page = int($subcommand)
|
||||
}
|
||||
elsif (defined $subcommand && $subcommand ne "") {
|
||||
|
||||
requireProjectOwner($c, $project);
|
||||
|
||||
if ($subcommand eq "edit") {
|
||||
$c->stash->{template} = 'edit-releaseset.tt';
|
||||
return;
|
||||
}
|
||||
|
||||
elsif ($subcommand eq "submit") {
|
||||
txn_do($c->model('DB')->schema, sub {
|
||||
updateReleaseSet($c, $releaseSet);
|
||||
});
|
||||
return $c->res->redirect($c->uri_for("/releases", $projectName, $releaseSet->name));
|
||||
}
|
||||
|
||||
elsif ($subcommand eq "delete") {
|
||||
txn_do($c->model('DB')->schema, sub {
|
||||
$releaseSet->delete;
|
||||
});
|
||||
return $c->res->redirect($c->uri_for($c->controller('Project')->action_for('view'), [$project->name]));
|
||||
}
|
||||
|
||||
else { error($c, "Unknown subcommand."); }
|
||||
}
|
||||
|
||||
$c->stash->{template} = 'releases.tt';
|
||||
|
||||
my @releases = ();
|
||||
push @releases, getRelease($_, $jobs) foreach getPrimaryBuildsForReleaseSet($project, $primaryJob, $page, $resultsPerPage);
|
||||
|
||||
$c->stash->{baseUri} = $c->uri_for($self->action_for("releases"), $projectName, $releaseSetName);
|
||||
$c->stash->{releases} = [@releases];
|
||||
$c->stash->{page} = $page;
|
||||
$c->stash->{totalReleases} = getPrimaryBuildTotal($project, $primaryJob);
|
||||
$c->stash->{resultsPerPage} = $resultsPerPage;
|
||||
}
|
||||
|
||||
|
||||
sub create_releaseset :Local {
|
||||
my ($self, $c, $projectName, $subcommand) = @_;
|
||||
|
||||
my $project = $c->model('DB::Projects')->find($projectName);
|
||||
error($c, "Project $projectName doesn't exist.") if !defined $project;
|
||||
$c->stash->{project} = $project;
|
||||
|
||||
requireProjectOwner($c, $project);
|
||||
|
||||
if (defined $subcommand && $subcommand eq "submit") {
|
||||
my $releaseSetName = $c->request->params->{name};
|
||||
txn_do($c->model('DB')->schema, sub {
|
||||
# Note: $releaseSetName is validated in updateProject,
|
||||
# which will abort the transaction if the name isn't
|
||||
# valid.
|
||||
my $releaseSet = $project->releasesets->create({name => $releaseSetName});
|
||||
updateReleaseSet($c, $releaseSet);
|
||||
return $c->res->redirect($c->uri_for("/releases", $projectName, $releaseSet->name));
|
||||
});
|
||||
}
|
||||
|
||||
$c->stash->{template} = 'edit-releaseset.tt';
|
||||
$c->stash->{create} = 1;
|
||||
}
|
||||
|
||||
|
||||
sub release :Local {
|
||||
my ($self, $c, $projectName, $releaseSetName, $releaseId, @args) = @_;
|
||||
$c->stash->{template} = 'release.tt';
|
||||
|
||||
my ($project, $releaseSet, $primaryJob, $jobs) = getReleaseSet($c, $projectName, $releaseSetName);
|
||||
|
||||
if ($releaseId eq "latest") {
|
||||
# Redirect to the latest successful release.
|
||||
my $latest = getLatestSuccessfulRelease($project, $primaryJob, $jobs);
|
||||
error($c, "This release set has no successful releases yet.") if !defined $latest;
|
||||
return $c->res->redirect($c->uri_for("/release", $projectName, $releaseSetName, $latest->id, @args));
|
||||
}
|
||||
|
||||
# Note: we don't actually check whether $releaseId is a primary
|
||||
# build, but who cares?
|
||||
my $primaryBuild = $project->builds->find($releaseId,
|
||||
{ join => 'resultInfo',
|
||||
, '+select' => ["resultInfo.releasename", "resultInfo.buildstatus"]
|
||||
, '+as' => ["releasename", "buildstatus"] })
|
||||
or error($c, "Release $releaseId doesn't exist.");
|
||||
|
||||
$c->stash->{release} = getRelease($primaryBuild, $jobs);
|
||||
|
||||
# Provide a redirect to the specified job of this release. !!!
|
||||
# This isn't uniquely defined if there are multiple jobs with the
|
||||
# same name (e.g. builds for different platforms). However, this
|
||||
# mechanism is primarily to allow linking to resources of which
|
||||
# there is only one build, such as the manual of the latest
|
||||
# release.
|
||||
if (scalar @args != 0) {
|
||||
my $jobName = shift @args;
|
||||
(my $build, my @others) = grep { $_->{job}->job eq $jobName } @{$c->stash->{release}->{jobs}};
|
||||
notFound($c, "Release doesn't have a job named `$jobName'")
|
||||
unless defined $build;
|
||||
error($c, "Job `$jobName' isn't unique.") if @others;
|
||||
return $c->res->redirect($c->uri_for($c->controller('Build')->action_for('view_build'),
|
||||
[$build->{build}->id], @args));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Hydra::Base::Controller::ListBuilds needs this.
|
||||
sub get_builds : Chained('/') PathPart('') CaptureArgs(0) {
|
||||
my ($self, $c) = @_;
|
||||
|
161
src/lib/Hydra/Controller/View.pm
Normal file
161
src/lib/Hydra/Controller/View.pm
Normal file
@ -0,0 +1,161 @@
|
||||
package Hydra::Controller::View;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use base 'Catalyst::Controller';
|
||||
use Hydra::Helper::Nix;
|
||||
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;
|
||||
|
||||
(my $view) = $c->model('DB::Views')->find($projectName, $viewName);
|
||||
notFound($c, "View $viewName doesn't exist.") if !defined $view;
|
||||
$c->stash->{view} = $view;
|
||||
|
||||
(my $primaryJob) = $view->viewjobs->search({isprimary => 1});
|
||||
#die "View $viewName doesn't have a primary job." if !defined $primaryJob;
|
||||
|
||||
my $jobs = [$view->viewjobs->search({},
|
||||
{order_by => ["isprimary DESC", "job", "attrs"]})];
|
||||
|
||||
$c->stash->{jobs} = $jobs;
|
||||
|
||||
return ($project, $view, $primaryJob, $jobs);
|
||||
}
|
||||
|
||||
|
||||
sub updateReleaseSet {
|
||||
my ($c, $releaseSet) = @_;
|
||||
|
||||
my $releaseSetName = trim $c->request->params->{name};
|
||||
error($c, "Invalid release set name: $releaseSetName")
|
||||
unless $releaseSetName =~ /^[[:alpha:]][\w\-]*$/;
|
||||
|
||||
$releaseSet->update(
|
||||
{ name => $releaseSetName
|
||||
, description => trim $c->request->params->{description} });
|
||||
|
||||
$releaseSet->releasesetjobs->delete_all;
|
||||
|
||||
foreach my $param (keys %{$c->request->params}) {
|
||||
next unless $param =~ /^job-(\d+)-name$/;
|
||||
my $baseName = $1;
|
||||
|
||||
my $name = trim $c->request->params->{"job-$baseName-name"};
|
||||
my $description = trim $c->request->params->{"job-$baseName-description"};
|
||||
my $attrs = trim $c->request->params->{"job-$baseName-attrs"};
|
||||
|
||||
$name =~ /^([\w\-]+):([\w\-]+)$/ or error($c, "Invalid job name: $name");
|
||||
my $jobsetName = $1;
|
||||
my $jobName = $2;
|
||||
|
||||
error($c, "Jobset `$jobsetName' doesn't exist.")
|
||||
unless $releaseSet->project->jobsets->find({name => $jobsetName});
|
||||
|
||||
# !!! We could check whether the job exists, but that would
|
||||
# require the scheduler to have seen the job, which may not be
|
||||
# the case.
|
||||
|
||||
$releaseSet->releasesetjobs->create(
|
||||
{ jobset => $jobsetName
|
||||
, job => $jobName
|
||||
, description => $description
|
||||
, attrs => $attrs
|
||||
, isprimary => $c->request->params->{"primary"} eq $baseName ? 1 : 0
|
||||
});
|
||||
}
|
||||
|
||||
error($c, "There must be one primary job.")
|
||||
if $releaseSet->releasesetjobs->search({isprimary => 1})->count != 1;
|
||||
}
|
||||
|
||||
|
||||
sub view : Chained('/') PathPart('view') CaptureArgs(2) {
|
||||
my ($self, $c, $projectName, $viewName) = @_;
|
||||
my ($project, $view, $primaryJob, $jobs) = getView($c, $projectName, $viewName);
|
||||
$c->stash->{project} = $project;
|
||||
$c->stash->{view} = $view;
|
||||
$c->stash->{primaryJob} = $primaryJob;
|
||||
$c->stash->{jobs} = $jobs;
|
||||
}
|
||||
|
||||
|
||||
sub view_view : Chained('view') PathPart('') Args(0) {
|
||||
my ($self, $c) = @_;
|
||||
|
||||
$c->stash->{template} = 'view.tt';
|
||||
|
||||
my $resultsPerPage = 10;
|
||||
my $page = int($c->req->param('page')) || 1;
|
||||
|
||||
my @results = ();
|
||||
push @results, getRelease($_, $c->stash->{jobs}) foreach
|
||||
getPrimaryBuildsForReleaseSet($c->stash->{project}, $c->stash->{primaryJob}, $page, $resultsPerPage);
|
||||
|
||||
$c->stash->{baseUri} = $c->uri_for($self->action_for("view"), $c->stash->{project}->name, $c->stash->{view}->name);
|
||||
$c->stash->{results} = [@results];
|
||||
$c->stash->{page} = $page;
|
||||
$c->stash->{totalResults} = getPrimaryBuildTotal($c->stash->{project}, $c->stash->{primaryJob});
|
||||
$c->stash->{resultsPerPage} = $resultsPerPage;
|
||||
}
|
||||
|
||||
|
||||
sub edit : Chained('view') PathPart('edit') Args(0) {
|
||||
my ($self, $c) = @_;
|
||||
requireProjectOwner($c, $c->stash->{project});
|
||||
$c->stash->{template} = 'edit-view.tt';
|
||||
}
|
||||
|
||||
|
||||
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 = getLatestSuccessfulRelease(
|
||||
$c->stash->{project}, $c->stash->{primaryJob}, $c->stash->{jobs});
|
||||
error($c, "This view set has no successful results yet.") if !defined $latest;
|
||||
return $c->res->redirect($c->uri_for("/view", $c->stash->{project}->name, $c->stash->{view}->name, $latest->id, @args));
|
||||
}
|
||||
|
||||
|
||||
sub result : Chained('view') PathPart('') {
|
||||
my ($self, $c, $id, @args) = @_;
|
||||
|
||||
$c->stash->{template} = 'release.tt';
|
||||
|
||||
# Note: we don't actually check whether $id is a primary build,
|
||||
# but who cares?
|
||||
my $primaryBuild = $c->stash->{project}->builds->find($id,
|
||||
{ join => 'resultInfo',
|
||||
, '+select' => ["resultInfo.releasename", "resultInfo.buildstatus"]
|
||||
, '+as' => ["releasename", "buildstatus"] })
|
||||
or error($c, "Build $id doesn't exist.");
|
||||
|
||||
$c->stash->{release} = getRelease($primaryBuild, $c->stash->{jobs});
|
||||
|
||||
# Provide a redirect to the specified job of this release. !!!
|
||||
# This isn't uniquely defined if there are multiple jobs with the
|
||||
# same name (e.g. builds for different platforms). However, this
|
||||
# mechanism is primarily to allow linking to resources of which
|
||||
# there is only one build, such as the manual of the latest
|
||||
# release.
|
||||
if (scalar @args != 0) {
|
||||
my $jobName = shift @args;
|
||||
(my $build, my @others) = grep { $_->{job}->job eq $jobName } @{$c->stash->{release}->{jobs}};
|
||||
notFound($c, "Release doesn't have a job named `$jobName'")
|
||||
unless defined $build;
|
||||
error($c, "Job `$jobName' isn't unique.") if @others;
|
||||
return $c->res->redirect($c->uri_for($c->controller('Build')->action_for('view_build'),
|
||||
[$build->{build}->id], @args));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
1;
|
@ -239,12 +239,10 @@ sub getRelease {
|
||||
$thisBuild = findLastJobForPrimaryBuild($primaryBuild, $job) ;
|
||||
}
|
||||
|
||||
if ($job->mayfail != 1) {
|
||||
if (!defined $thisBuild) {
|
||||
$status = 2 if $status == 0; # = unfinished
|
||||
} elsif ($thisBuild->get_column('buildstatus') != 0) {
|
||||
$status = 1; # = failed
|
||||
}
|
||||
if (!defined $thisBuild) {
|
||||
$status = 2 if $status == 0; # = unfinished
|
||||
} elsif ($thisBuild->get_column('buildstatus') != 0) {
|
||||
$status = 1; # = failed
|
||||
}
|
||||
|
||||
$timestamp = $thisBuild->timestamp
|
||||
|
@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema';
|
||||
__PACKAGE__->load_classes;
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vdr83mcEie4i5Fn/Uj17Vg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ODLRc6VfDQpb8MyXPKmqtg
|
||||
|
||||
|
||||
# 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-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yodYRloko+NdaEVy+IL5JA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gtA3wQA2CLsXs4X95PfX9A
|
||||
|
||||
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-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GdjLBqXz+LK4ewxnpIs9eQ
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ii6N3v4M1fX1tQ3YmJNFWw
|
||||
|
||||
|
||||
# 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-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KTPvLaqbXGpynWt107ISew
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EMvF2g+MDIE84yjnJOs7og
|
||||
|
||||
__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-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:thMie1PGP25FGbo5qypE/w
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RcdX5dHefBQnxQYbMxNF/w
|
||||
|
||||
|
||||
# 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-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ua+P31BMRmMKP6QFOdA89A
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1AQCHpuv8Lqk/FYdU8JYFA
|
||||
|
||||
1;
|
||||
|
@ -163,8 +163,8 @@ __PACKAGE__->has_many(
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:luxYxoOAtLoCgl5iFTYdJA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CcYlMej7OPRUJn6375Qlqw
|
||||
|
||||
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-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DeoyeS42ddQ2FXa+8n31OQ
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mYBdemei1tFuK8Ll6eMLfQ
|
||||
|
||||
|
||||
# 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-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CaFTGQtLjPwCISqk5W4fag
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bE+w54cACUS2L0PJ9gPjtw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -75,8 +75,8 @@ __PACKAGE__->belongs_to(
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+Cb0mIbX8ddDbZY39u9feA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:c0OEe2zPd/E4vh0PRXm4Ag
|
||||
|
||||
|
||||
# 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-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m3a1Q6c2FePidqbqYhz5dg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jS8pitmHFnplE8WcK0OyMQ
|
||||
|
||||
|
||||
# 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-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QSYSg5xsN292LnfvbAG0Vw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:W0rhMTOzLBZNsVShQHg5+A
|
||||
|
||||
|
||||
# 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-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:85FwtlvNxjGix7PUCJTMqA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CB5lPsrozpvO8gLXHTyMrQ
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -65,19 +65,19 @@ __PACKAGE__->has_many(
|
||||
{ "foreign.project" => "self.name" },
|
||||
);
|
||||
__PACKAGE__->has_many(
|
||||
"releasesets",
|
||||
"Hydra::Schema::ReleaseSets",
|
||||
"views",
|
||||
"Hydra::Schema::Views",
|
||||
{ "foreign.project" => "self.name" },
|
||||
);
|
||||
__PACKAGE__->has_many(
|
||||
"releasesetjobs",
|
||||
"Hydra::Schema::ReleaseSetJobs",
|
||||
"viewjobs",
|
||||
"Hydra::Schema::ViewJobs",
|
||||
{ "foreign.project" => "self.name" },
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Dru36PNUe9iYHEwhhHKJ3A
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:N6NPLJfc1gKM4zz6dS5PJw
|
||||
|
||||
|
||||
# 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-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mfZTzyri5eSRhfmBmwyuFQ
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EkpopxgwlZf8Du3EmWzTKQ
|
||||
|
||||
|
||||
# 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-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6RgJY04rmD+PumWXz5KGoQ
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:W2Q6219GlZl2IqQkBoFmFA
|
||||
|
||||
|
||||
# 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-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZWzljXMF0IbU12wNUn+djg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qH+qBI3xxQgTNf3v7E3sDw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -1,4 +1,4 @@
|
||||
package Hydra::Schema::ReleaseSetJobs;
|
||||
package Hydra::Schema::ViewJobs;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
@ -6,7 +6,7 @@ use warnings;
|
||||
use base 'DBIx::Class';
|
||||
|
||||
__PACKAGE__->load_components("Core");
|
||||
__PACKAGE__->table("ReleaseSetJobs");
|
||||
__PACKAGE__->table("ViewJobs");
|
||||
__PACKAGE__->add_columns(
|
||||
"project",
|
||||
{
|
||||
@ -16,7 +16,7 @@ __PACKAGE__->add_columns(
|
||||
is_nullable => 0,
|
||||
size => undef,
|
||||
},
|
||||
"release_",
|
||||
"view_",
|
||||
{
|
||||
data_type => "text",
|
||||
default_value => undef,
|
||||
@ -40,8 +40,6 @@ __PACKAGE__->add_columns(
|
||||
},
|
||||
"isprimary",
|
||||
{ data_type => "integer", default_value => 0, is_nullable => 0, size => undef },
|
||||
"mayfail",
|
||||
{ data_type => "integer", default_value => 0, is_nullable => 0, size => undef },
|
||||
"description",
|
||||
{
|
||||
data_type => "text",
|
||||
@ -56,18 +54,20 @@ __PACKAGE__->add_columns(
|
||||
is_nullable => 0,
|
||||
size => undef,
|
||||
},
|
||||
"autorelease",
|
||||
{ data_type => "integer", default_value => 0, is_nullable => 0, size => undef },
|
||||
);
|
||||
__PACKAGE__->set_primary_key("project", "release_", "job", "attrs");
|
||||
__PACKAGE__->set_primary_key("project", "view_", "job", "attrs");
|
||||
__PACKAGE__->belongs_to("project", "Hydra::Schema::Projects", { name => "project" });
|
||||
__PACKAGE__->belongs_to(
|
||||
"releaseset",
|
||||
"Hydra::Schema::ReleaseSets",
|
||||
{ name => "release_", project => "project" },
|
||||
"view",
|
||||
"Hydra::Schema::Views",
|
||||
{ name => "view_", project => "project" },
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qSQjyHzxQp0qO3CbRdcXmw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LkiGAkZOiLNJk6oDY0+zNw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
@ -1,4 +1,4 @@
|
||||
package Hydra::Schema::ReleaseSets;
|
||||
package Hydra::Schema::Views;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
@ -6,7 +6,7 @@ use warnings;
|
||||
use base 'DBIx::Class';
|
||||
|
||||
__PACKAGE__->load_components("Core");
|
||||
__PACKAGE__->table("ReleaseSets");
|
||||
__PACKAGE__->table("Views");
|
||||
__PACKAGE__->add_columns(
|
||||
"project",
|
||||
{
|
||||
@ -36,17 +36,14 @@ __PACKAGE__->add_columns(
|
||||
__PACKAGE__->set_primary_key("project", "name");
|
||||
__PACKAGE__->belongs_to("project", "Hydra::Schema::Projects", { name => "project" });
|
||||
__PACKAGE__->has_many(
|
||||
"releasesetjobs",
|
||||
"Hydra::Schema::ReleaseSetJobs",
|
||||
{
|
||||
"foreign.project" => "self.project",
|
||||
"foreign.release_" => "self.name",
|
||||
},
|
||||
"viewjobs",
|
||||
"Hydra::Schema::ViewJobs",
|
||||
{ "foreign.project" => "self.project", "foreign.view_" => "self.name" },
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pEjxqTAwP4ZmP/s6F4VOsg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hV+xzi564rgcYeDvz75zCA
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
Reference in New Issue
Block a user