That was added in 2.50 I believe. I added support for pipeline in token-macro and email-ext picked it up and added the necessary stuff to use it.
On Tue, Nov 1, 2016 at 1:55 PM Indra Gunawan (ingunawa) <[email protected]> wrote: > Token from EmailExt plugin still does not work in pipeline. > see: > http://stackoverflow.com/questions/35793687/email-ext-and-workflow-pipeline-some-tokens-not-being-expanded > > From: <[email protected]> on behalf of Jim Klo < > [email protected]> > Reply-To: "[email protected]" < > [email protected]> > Date: Tuesday, November 1, 2016 at 1:13 PM > To: Jenkins Users <[email protected]> > Subject: Sending email to $DEFAULT_RECIPIENTS via Pipeline script? > > Greetings, > > I'm trying to send email to the $DEFAULT_RECIPIENTS settings within my > Jenkinsfile Pipeline script, and having very little success. > > Here's what I've tried so far: > > emailext ( > to: "${DEFAULT_RECIPIENTS}", > subject: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'", > body: """<p>FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':</p> > <p>Check console output at "<a > href='${env.BUILD_URL}'>${env.JOB_NAME} > [${env.BUILD_NUMBER}]</a>"</p>""", > attachLog: true, > compressLog: true > ) > > This just yields the following error: > > groovy.lang.MissingPropertyException: No such property: DEFAULT_RECIPIENTS > for class: groovy.lang.Binding > > > And using ${env.DEFAULT_RECIPIENTS} results in a null value. > > Can someone provide some pointers? > > FWIW using various providers doesn't work for us as the committer id's > don't map to a common "@domain.org" address. > > Thanks, > > Jim > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/552b049d-8241-44cf-a9b1-c004d816295c%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/552b049d-8241-44cf-a9b1-c004d816295c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/D43E4EDE.5F44E%25ingunawa%40cisco.com > <https://groups.google.com/d/msgid/jenkinsci-users/D43E4EDE.5F44E%25ingunawa%40cisco.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVd6BtQoK3Qsgxbto0Z9RzybhYN-ar%2B4hq-ikzS1GqF46A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
