forked from lix-project/hydra
finish making the dynamic hooks only run on project & jobset agreement
This commit is contained in:
parent
aef11685a0
commit
0810f5debc
|
@ -71,9 +71,15 @@ sub isBuildEligibleForDynamicRunCommand {
|
|||
return 0;
|
||||
}
|
||||
|
||||
if ($build->jobset->enable_dynamic_run_command) {
|
||||
return 1;
|
||||
if (! $build->jobset->enable_dynamic_run_command) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (! $build->project->enable_dynamic_run_command) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -173,7 +173,7 @@ subtest "isBuildEligibleForDynamicRunCommand" => sub {
|
|||
};
|
||||
|
||||
subtest "With dynamic runcommand disabled ..." => sub {
|
||||
subtest "disabled on the project, enabled on the jobset" => {
|
||||
subtest "disabled on the project, enabled on the jobset" => sub {
|
||||
$build->project->update({enable_dynamic_run_command => 0});
|
||||
$build->jobset->update({enable_dynamic_run_command => 1});
|
||||
|
||||
|
@ -184,7 +184,7 @@ subtest "isBuildEligibleForDynamicRunCommand" => sub {
|
|||
);
|
||||
};
|
||||
|
||||
subtest "enabled on the project, disabled on the jobset" => {
|
||||
subtest "enabled on the project, disabled on the jobset" => sub {
|
||||
$build->project->update({enable_dynamic_run_command => 1});
|
||||
$build->jobset->update({enable_dynamic_run_command => 0});
|
||||
|
||||
|
@ -195,7 +195,7 @@ subtest "isBuildEligibleForDynamicRunCommand" => sub {
|
|||
);
|
||||
};
|
||||
|
||||
subtest "disabled on the project, disabled on the jobset" => {
|
||||
subtest "disabled on the project, disabled on the jobset" => sub {
|
||||
$build->project->update({enable_dynamic_run_command => 0});
|
||||
$build->jobset->update({enable_dynamic_run_command => 0});
|
||||
|
||||
|
|
Loading…
Reference in a new issue