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:
|
||||
description: when true the jobset sends emails when previously-successful builds fail
|
||||
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:
|
||||
description: when true the jobset is visible in the web frontend
|
||||
type: boolean
|
||||
|
|
|
@ -268,6 +268,7 @@ sub updateJobset {
|
|||
, nixexprinput => $nixExprInput
|
||||
, enabled => $enabled
|
||||
, 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}) || ""
|
||||
, hidden => defined $c->stash->{params}->{visible} ? 0 : 1
|
||||
, keepnr => int(trim($c->stash->{params}->{keepnr} // "0"))
|
||||
|
|
|
@ -157,6 +157,13 @@
|
|||
</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">
|
||||
<label class="col-sm-3" for="editjobsetenableemail">Email notification</label>
|
||||
<div class="col-sm-9">
|
||||
|
|
|
@ -160,6 +160,10 @@
|
|||
<th>Scheduling shares:</th>
|
||||
<td>[% jobset.schedulingshares %] [% IF totalShares %] ([% f = format("%.2f"); f(jobset.schedulingshares / totalShares * 100) %]% out of [% totalShares %] shares)[% END %]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Enable Dynamic RunCommand Hooks:</th>
|
||||
<td>[% jobset.enable_dynamic_run_command ? "Yes" : "No" %]</td>
|
||||
</tr>
|
||||
[% IF emailNotification %]
|
||||
<tr>
|
||||
<th>Enable email notification:</th>
|
||||
|
|
|
@ -73,6 +73,7 @@ subtest 'Read newly-created jobset "job"' => sub {
|
|||
emailoverride => "",
|
||||
enabled => 2,
|
||||
enableemail => JSON::MaybeXS::false,
|
||||
enable_dynamic_run_command => JSON::MaybeXS::false,
|
||||
errortime => undef,
|
||||
errormsg => "",
|
||||
fetcherrormsg => "",
|
||||
|
|
Loading…
Reference in a new issue