Files
lix/src/lib/Hydra/Plugin/DeclarativeJobsets.pm
T
Graham Christensen 593af41808 Declarative jobsets: move event handling to a plugin
Declarative jobsets were sort of tucked in to the event hanlder
itself. It turned out that it could have been implemented as a
plugin without much trouble.
2021-08-12 12:48:18 -04:00

18 lines
435 B
Perl

package Hydra::Plugin::DeclarativeJobsets;
use strict;
use parent 'Hydra::Plugin';
use Hydra::Helper::AddBuilds;
sub buildFinished {
my ($self, $build, $dependents) = @_;
my $project = $build->project;
my $jobsetName = $build->get_column('jobset');
if (length($project->declfile) && $jobsetName eq ".jobsets" && $build->iscurrent) {
handleDeclarativeJobsetBuild($self->{"db"}, $project, $build);
}
}
1;