diff --git a/src/lib/Hydra/Controller/API.pm b/src/lib/Hydra/Controller/API.pm index 1df520c6..36168fd2 100644 --- a/src/lib/Hydra/Controller/API.pm +++ b/src/lib/Hydra/Controller/API.pm @@ -291,11 +291,12 @@ sub push : Chained('api') PathPart('push') Args(0) { $c->{stash}->{json}->{jobsetsTriggered} = []; + my $force = exists $c->request->query_params->{force}; my @jobsets = split /,/, ($c->request->query_params->{jobsets} // ""); foreach my $s (@jobsets) { my ($p, $j) = parseJobsetName($s); my $jobset = $c->model('DB::Jobsets')->find($p, $j); - next unless defined $jobset && $jobset->project->enabled && $jobset->enabled; + next unless defined $jobset && ($force || ($jobset->project->enabled && $jobset->enabled)); triggerJobset($self, $c, $jobset); } diff --git a/src/root/topbar.tt b/src/root/topbar.tt index 7fcbc6ea..d8175392 100644 --- a/src/root/topbar.tt +++ b/src/root/topbar.tt @@ -83,7 +83,7 @@ 'Are you sure you want to force evaluation of this jobset?', function(c) { if (!c) return; - $.post("[% c.uri_for('/api/push', { jobsets = project.name _ ':' _ jobset.name }) %]") + $.post("[% c.uri_for('/api/push', { jobsets = project.name _ ':' _ jobset.name, force = "1" }) %]") .done(function(data) { if (data.error) bootbox.alert("Unable to schedule the jobset for evaluation: " + data.error);