Allow for precisely one instance of RunCommand plugin
[?]
Aug 21, 2018, 2:51 PM
OAGCZHK6XBVVEY7BX23CKWIZLG2WUH3J6B5BCHNOXMNDUIUWK7OACDependencies
- [2]
6ZXL5UOPAdd a plugin to execute arbitrary commands when a build finishes - [3]
GD2WBYPTRunCommand: Return metrics as a float
Change contents
- replacement in src/lib/Hydra/Plugin/RunCommand.pm at line 28
my ($cfg, $event) = @_;for my $x (split " ", ($cfg->{events} // "buildFinished")) {my ($conf, $event) = @_;for my $x (split " ", ($conf->{events} // "buildFinished")) { - replacement in src/lib/Hydra/Plugin/RunCommand.pm at line 39
my $config = $self->{config}->{runcommand} // [];my $cfg = $self->{config}->{runcommand};my @config = defined $cfg ? ref $cfg eq "ARRAY" ? @$cfg : ($cfg) : (); - replacement in src/lib/Hydra/Plugin/RunCommand.pm at line 44
foreach my $cfg (@$config) {next unless eventMatches($cfg, $event);foreach my $conf (@config) {next unless eventMatches($conf, $event); - replacement in src/lib/Hydra/Plugin/RunCommand.pm at line 47
$cfg->{job} // "*:*:*",$conf->{job} // "*:*:*", - replacement in src/lib/Hydra/Plugin/RunCommand.pm at line 52
my $command = $cfg->{command} // die "<runcommand> section lacks a 'command' option";my $command = $conf->{command} // die "<runcommand> section lacks a 'command' option";