diff --git a/src/lib/Hydra/Plugin/BitBucketStatus.pm b/src/lib/Hydra/Plugin/BitBucketStatus.pm index 72ed3b6b..33e3bc03 100644 --- a/src/lib/Hydra/Plugin/BitBucketStatus.pm +++ b/src/lib/Hydra/Plugin/BitBucketStatus.pm @@ -10,7 +10,7 @@ use Hydra::Helper::CatalystUtils; sub isEnabled { my ($self) = @_; - return $self->{config}->{enable_bitbucket_status} == 1; + return ($self->{config}->{enable_bitbucket_status} // 0) == 1; } sub toBitBucketState { diff --git a/src/lib/Hydra/Plugin/CoverityScan.pm b/src/lib/Hydra/Plugin/CoverityScan.pm index c7b39d02..0a7fae0c 100644 --- a/src/lib/Hydra/Plugin/CoverityScan.pm +++ b/src/lib/Hydra/Plugin/CoverityScan.pm @@ -53,7 +53,7 @@ sub buildFinished { my $covTarball; opendir my $tarballs_handle, $tarballs or die; - while (my $file = readdir $tarballshandle) { + while (my $file = readdir $tarballs_handle) { next unless $file =~ /.*-coverity-int\.(tgz|lzma|xz|bz2|zip)$/; $covTarball = "$tarballs/$file"; last; } diff --git a/src/lib/Hydra/Plugin/EmailNotification.pm b/src/lib/Hydra/Plugin/EmailNotification.pm index 721365e1..b5f133a6 100644 --- a/src/lib/Hydra/Plugin/EmailNotification.pm +++ b/src/lib/Hydra/Plugin/EmailNotification.pm @@ -12,7 +12,7 @@ use Hydra::Helper::Email; sub isEnabled { my ($self) = @_; - return $self->{config}->{email_notification} == 1; + return ($self->{config}->{email_notification} // 0) == 1; } my $template = < "| $Nix::Config::xz", - bzip2 => "| $Nix::Config::bzip2", - none => "" -); +my %compressors = (); + +$compressors{"none"} = ""; + +if (defined($Nix::Config::bzip2)) { + $compressors{"bzip2"} = "| $Nix::Config::bzip2", +} + +if (defined($Nix::Config::xz)) { + $compressors{"xz"} = "| $Nix::Config::xz", +} + my $lockfile = Hydra::Model::DB::getHydraPath . "/.hydra-s3backup.lock"; sub buildFinished { diff --git a/src/script/hydra-eval-jobset b/src/script/hydra-eval-jobset index 4a165d86..7a9af09f 100755 --- a/src/script/hydra-eval-jobset +++ b/src/script/hydra-eval-jobset @@ -567,7 +567,7 @@ sub checkJobsetWrapped { my $inputInfo = {}; if ($jobsetsJobset) { my @declInputs = fetchInput($plugins, $db, $project, $jobset, "decl", $project->decltype, $project->declvalue, 0); - my $declInput = @declInputs[0] or die "cannot find the input containing the declarative project specification\n"; + my $declInput = $declInputs[0] or die "cannot find the input containing the declarative project specification\n"; die "multiple alternatives for the input containing the declarative project specification are not supported\n" if scalar @declInputs != 1; my $declFile = $declInput->{storePath} . "/" . $project->declfile;