Check if we want to send email for a build before iterating through its users

[?]
Jul 5, 2013, 6:06 PM
J4C4V6GLQUZLVB4JPPDS233YI2MPP6LT3WALHWBXOKRKNKRTWSWQC

Dependencies

  • [2] RPTSGIRC Eliminate duplicate getPreviousBuild functions
  • [3] QDJRQIFF If multiple dependent builds fail, send a single email
  • [4] 5EQYVRWE Add a plugin mechanism

Change contents

  • replacement in src/lib/Hydra/Plugin/EmailNotification.pm at line 55
    [2.866][3.910:1006](),[3.910][3.910:1006]()
    my $to = $b->jobset->emailoverride ne "" ? $b->jobset->emailoverride : $b->maintainers;
    [2.866]
    [3.783]
    # Do we want to send mail for this build?
    unless ($ENV{'HYDRA_FORCE_SEND_MAIL'}) {
    next unless $b->jobset->enableemail;
  • replacement in src/lib/Hydra/Plugin/EmailNotification.pm at line 59
    [3.784][3.1007:1092]()
    foreach my $address (split ",", $to) {
    $address = trim $address;
    [3.784]
    [3.1092]
    # If build is cancelled or aborted, do not send email.
    next if $b->buildstatus == 4 || $b->buildstatus == 3;
  • replacement in src/lib/Hydra/Plugin/EmailNotification.pm at line 62
    [3.1093][3.1093:1253]()
    # Do we want to send mail for this build?
    unless ($ENV{'HYDRA_FORCE_SEND_MAIL'}) {
    next unless $b->jobset->enableemail;
    [3.1093]
    [3.1174]
    # If there is a previous (that is not cancelled or aborted) build
    # with same buildstatus, do not send email.
    next if defined $prevBuild && ($b->buildstatus == $prevBuild->buildstatus);
    }
  • replacement in src/lib/Hydra/Plugin/EmailNotification.pm at line 67
    [3.1175][3.1254:1395]()
    # If build is cancelled or aborted, do not send email.
    next if $b->buildstatus == 4 || $b->buildstatus == 3;
    [3.1175]
    [3.1372]
    my $to = $b->jobset->emailoverride ne "" ? $b->jobset->emailoverride : $b->maintainers;
  • replacement in src/lib/Hydra/Plugin/EmailNotification.pm at line 69
    [3.1373][3.1396:1644]()
    # If there is a previous (that is not cancelled or aborted) build
    # with same buildstatus, do not send email.
    next if defined $prevBuild && ($b->buildstatus == $prevBuild->buildstatus);
    }
    [3.1373]
    [3.1508]
    foreach my $address (split ",", $to) {
    $address = trim $address;