forked from lix-project/hydra
HTTP/Jobset: support setting / reading enable_dynamic_run_command
This commit is contained in:
parent
1802bd0113
commit
726ea80e99
|
@ -689,6 +689,9 @@ components:
|
||||||
enableemail:
|
enableemail:
|
||||||
description: when true the jobset sends emails when previously-successful builds fail
|
description: when true the jobset sends emails when previously-successful builds fail
|
||||||
type: boolean
|
type: boolean
|
||||||
|
enable_dynamic_run_command:
|
||||||
|
description: when true the jobset supports executing dynamically defined RunCommand hooks. Requires the server and project's configuration to also enable dynamic RunCommand.
|
||||||
|
type: boolean
|
||||||
visible:
|
visible:
|
||||||
description: when true the jobset is visible in the web frontend
|
description: when true the jobset is visible in the web frontend
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
|
@ -268,6 +268,7 @@ sub updateJobset {
|
||||||
, nixexprinput => $nixExprInput
|
, nixexprinput => $nixExprInput
|
||||||
, enabled => $enabled
|
, enabled => $enabled
|
||||||
, enableemail => defined $c->stash->{params}->{enableemail} ? 1 : 0
|
, enableemail => defined $c->stash->{params}->{enableemail} ? 1 : 0
|
||||||
|
, enable_dynamic_run_command => defined $c->stash->{params}->{enable_dynamic_run_command} ? 1 : 0
|
||||||
, emailoverride => trim($c->stash->{params}->{emailoverride}) || ""
|
, emailoverride => trim($c->stash->{params}->{emailoverride}) || ""
|
||||||
, hidden => defined $c->stash->{params}->{visible} ? 0 : 1
|
, hidden => defined $c->stash->{params}->{visible} ? 0 : 1
|
||||||
, keepnr => int(trim($c->stash->{params}->{keepnr} // "0"))
|
, keepnr => int(trim($c->stash->{params}->{keepnr} // "0"))
|
||||||
|
|
|
@ -157,6 +157,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-sm-3" for="editjobsetenable_dynamic_run_command">Enable Dynamic RunCommand Hooks</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="checkbox" id="editjobsetenable_dynamic_run_command" name="enable_dynamic_run_command" [% IF jobset.enable_dynamic_run_command %]checked[% END %]/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-3" for="editjobsetenableemail">Email notification</label>
|
<label class="col-sm-3" for="editjobsetenableemail">Email notification</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
|
|
|
@ -160,6 +160,10 @@
|
||||||
<th>Scheduling shares:</th>
|
<th>Scheduling shares:</th>
|
||||||
<td>[% jobset.schedulingshares %] [% IF totalShares %] ([% f = format("%.2f"); f(jobset.schedulingshares / totalShares * 100) %]% out of [% totalShares %] shares)[% END %]</td>
|
<td>[% jobset.schedulingshares %] [% IF totalShares %] ([% f = format("%.2f"); f(jobset.schedulingshares / totalShares * 100) %]% out of [% totalShares %] shares)[% END %]</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Enable Dynamic RunCommand Hooks:</th>
|
||||||
|
<td>[% jobset.enable_dynamic_run_command ? "Yes" : "No" %]</td>
|
||||||
|
</tr>
|
||||||
[% IF emailNotification %]
|
[% IF emailNotification %]
|
||||||
<tr>
|
<tr>
|
||||||
<th>Enable email notification:</th>
|
<th>Enable email notification:</th>
|
||||||
|
|
|
@ -73,6 +73,7 @@ subtest 'Read newly-created jobset "job"' => sub {
|
||||||
emailoverride => "",
|
emailoverride => "",
|
||||||
enabled => 2,
|
enabled => 2,
|
||||||
enableemail => JSON::MaybeXS::false,
|
enableemail => JSON::MaybeXS::false,
|
||||||
|
enable_dynamic_run_command => JSON::MaybeXS::false,
|
||||||
errortime => undef,
|
errortime => undef,
|
||||||
errormsg => "",
|
errormsg => "",
|
||||||
fetcherrormsg => "",
|
fetcherrormsg => "",
|
||||||
|
|
Loading…
Reference in a new issue