3

I have a Jenkins Multibranch Pipeline Project and for every change of the buildresult I want to send an email to the developer(s) responsible.

I have the following function in my Jenkinsfile:

def notifyDevelopers() {
    if( currentBuild.result == currentBuild.previousBuild.result ) {
        return
    }

    emailext (
        subject: currentBuild.result + ': ' + env.BRANCH_NAME + ' - BuildNr: ' + env.BUILD_NUMBER,
        body: 'Hier gehts zum Build: ' + env.BUILD_URL,
        recipientProviders: [[$class: 'CulpritsRecipientProvider']]
    )
}

The email address produced by the [[$class: 'CulpritsRecipientProvider']] macro is the developers lastname followed by an @ and a guid

for example: lastname@d354d03a-fc21-8a42-9462-b75468b3cc25

How or where do I need to configure the email addresses of the developers so that the mailext plugin can properly send emails?

We use Jenkins 2.32.3 with mailext 1.20

The repo is a git repo hosted on an internal Bitbucket server.

Jenkins is totally open (No access control for users)

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.