Allow manually scheduling disabled jobsets for evaluation
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
3003bb1c99
commit
b8ea428bb1
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue