-
Bug
-
Resolution: Not A Defect
-
Minor
-
None
-
Jenkins 2.106, email-ext 2.61, Pipeline 2.5
I have a function that defines the emailex configuration like this:
def sendNotification(buildChanged) { // Some extra logic removed for presentation purposes. emailext ( subject: "[CI] ${env.JOB_NAME} ${env.BUILD_NUMBER} still unstable", body: "Build still unstable: ${env.BUILD_URL}", recipientProviders: [[ $class: "DevelopersRecipientProvider", $class: "RequesterRecipientProvider" ]] ) }
then I do this for notifications:
post { always { junit "reports/**/test*.xml" } changed { sendNotification buildChanged: true } failure { sendNotification buildChanged: false } unstable { sendNotification buildChanged: false } }
Unfortunately what happens after a commit is this:
An attempt to send an e-mail to empty list of recipients, ignored.
The developer list is definitely not empty. So the expected result is not empty.
Am I missing something? Also, somewhat related to this, is there a plan for a nicer syntax for the pipelines, especially for the declarative one? Configuring notifications right now, especially more complex ones, is tedious and error prone.
I can't comment on pipeline syntax I am not involved in that at all.
This all looks fine to me and should work the function is not annotated @NonCPS or something is it? the way you have posted it this should be the same as if you called emailext at each location directly