Please note that I'm a beginner working with Jenkins, so I might have missed something obvious.
I'm trying to use the Email-ext plugin in my Jenkins pipeline setup, but I do not seem to be able to retrieve any recipients.
Running the following code in my Jenkinsfile
echo emailextrecipients([
[$class: 'DevelopersRecipientProvider'],
[$class: 'CulpritsRecipientProvider'],
[$class: 'FirstFailingBuildSuspectsRecipientProvider'],
[$class: 'FailingTestSuspectsRecipientProvider']])
prints nothing, and the send mail code:
emailext(
attachLog: true,
body: 'Check console output at "<a href="${env.BUILD_URL}">${env.JOB_NAME} [${env.BUILD_NUMBER}]</a>"',
recipientProviders: [[$class: 'CulpritsRecipientProvider'], [$class: 'DevelopersRecipientProvider']],
subject: 'FAILED: Job \'${env.JOB_NAME} [${env.BUILD_NUMBER}]\':'
)
results in
An attempt to send an e-mail to empty list of recipients, ignored.
I am able to send example mails, so that seems to be working. Do I need to do anything in the Jenkins setup to define these variables?