There seems to be a lottery of some sort what I get from emailextrecipients

I expect to get the authors from the commits it is building, but most of 
the times emailextrecipients gives me nothing.

/**
 * Notify developers of failed build
 */
void notifyFailedBuild() {
    final def projectName = packageInfo.getProjectName()
    final def repositoryOwners = getRepositoryOwners(projectName)

    final def RECIPIENTS = emailextrecipients([
        [$class: 'DevelopersRecipientProvider'],
        [$class: 'CulpritsRecipientProvider'],
        [$class: 'UpstreamComitterRecipientProvider']
    ])

    final def SUBJECT = "${projectName} ${env.BRANCH_NAME} - Build 
#${env.BUILD_NUMBER} - FAILED!"
    final def CONTENT = "Check console output at ${env.BUILD_URL} to view 
the results."

    if (RECIPIENTS != null && !RECIPIENTS.isEmpty()) {
        mail to: RECIPIENTS, cc: repositoryOwners, bcc: "devops", replyTo: 
"[email protected]", subject: SUBJECT, body: CONTENT
    } else {
        mail to: repositoryOwners, bcc: "devops", replyTo: 
"[email protected]", subject: SUBJECT, body: CONTENT
    }
}

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f19567ce-1322-40ee-b9e3-822073762bc7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to