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)

Thomas
  • 2,137
  • 1
  • 17
  • 38

0 Answers0