Also check out this write up: https://ikeptwalking.com/using-email-ext-plugin-in-jenkins-pipeline/
On Monday, March 9, 2020 at 4:34:02 AM UTC-7, Alexander Dietz wrote: > > Hello, > > I am trying to use the extension "email-ext" but I could not find any > useable documentation for it on how to use it with YAML!. Below is an > excerpt from the xml definition - but how to write that in yaml? > > I have this documentation so far: > https://jenkins.io/doc/pipeline/steps/email-ext/ but it has no example. > Also I do not see a lot of common expressions. I mean, how to attach a > file? How to define the list of recipients? > > > <hudson.plugins.emailext.ExtendedEmailPublisher plugin="[email protected]"> > <recipientList>[email protected] <javascript:></recipientList> > <configuredTriggers> > <hudson.plugins.emailext.plugins.trigger.FailureTrigger> > <email> > <subject>$PROJECT_DEFAULT_SUBJECT</subject> > <body>$PROJECT_DEFAULT_CONTENT</body> > <recipientProviders> > > <hudson.plugins.emailext.plugins.recipients.DevelopersRecipientProvider/> > > <hudson.plugins.emailext.plugins.recipients.ListRecipientProvider/> > </recipientProviders> > <attachmentsPattern></attachmentsPattern> > <attachBuildLog>false</attachBuildLog> > <compressBuildLog>false</compressBuildLog> > <replyTo>$PROJECT_DEFAULT_REPLYTO</replyTo> > <contentType>project</contentType> > </email> > </hudson.plugins.emailext.plugins.trigger.FailureTrigger> > </configuredTriggers> > <contentType>text/plain</contentType> > <defaultSubject>Page check $WEBPAGE failed</defaultSubject> > <defaultContent>The page check for page '$WEBPAGE' failed. > See the attached report for details.</defaultContent> > <attachmentsPattern>linkreport.out</attachmentsPattern> > <presendScript>$DEFAULT_PRESEND_SCRIPT</presendScript> > <postsendScript>$DEFAULT_POSTSEND_SCRIPT</postsendScript> > <attachBuildLog>false</attachBuildLog> > <compressBuildLog>false</compressBuildLog> > <replyTo>$DEFAULT_REPLYTO</replyTo> > <from></from> > <saveOutput>false</saveOutput> > <disabled>false</disabled> > <matrixTriggerMode>ONLY_CONFIGURATIONS</matrixTriggerMode> > </hudson.plugins.emailext.ExtendedEmailPublisher> > > -- 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/d6052568-3537-43f5-9b5b-c45c822febe6%40googlegroups.com.
