def sendEmail_failedPR()

in jenkins-pipeline-shared-libraries/vars/mailer.groovy [9:20]


def sendEmail_failedPR(String additionalSubject = null ) {
    emailext(
            subject: "${additionalSubject?.trim() || additionalSubject?.trim() != null ? additionalSubject?.trim() : 'PR'} #$ghprbPullId of $ghprbGhRepository: $ghprbPullTitle failed",
            body:  """
                   Pull request #$ghprbPullId of $ghprbGhRepository: $ghprbPullTitle FAILED
                   Build log: ${BUILD_URL}consoleText
                   Failed tests \${TEST_COUNTS,var=\"fail\"}: ${BUILD_URL}testReport
                   (IMPORTANT: For visiting the links you need to have access to Red Hat VPN. In case you don\'t have access to RedHat VPN please download and decompress attached file.)
                   """,
            attachmentsPattern: 'error.log.gz',
            recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']])
}