How to use the "email-ext" extension?

232 views
Skip to first unread message

Alexander Dietz

unread,
Mar 9, 2020, 7:34:02 AM3/9/20
to Jenkins Users
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="emai...@2.66">
      <recipientList>alexand...@test.com</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 &apos;$WEBPAGE&apos; 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>

Slide

unread,
Mar 9, 2020, 7:54:14 AM3/9/20
to Jenkins User Mailing List
Is this for CasC? If so, I would recommend setting it up via the UI and then exporting the yaml to see how to use it.

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/44cca061-8b5d-4ca9-a3db-03e2f48cceae%40googlegroups.com.

Alexander Dietz

unread,
Mar 9, 2020, 8:03:04 AM3/9/20
to Jenkins Users
I can export the yaml? How to do so? I do not see such an option. 


Cheers
Alex


On Monday, 9 March 2020 12:54:14 UTC+1, slide wrote:
Is this for CasC? If so, I would recommend setting it up via the UI and then exporting the yaml to see how to use it.

On Mon, Mar 9, 2020, 04:33 Alexander Dietz <alexand...@epfl.ch> 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="emai...@2.66">
      <recipientList>alexan...@test.com</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 &apos;$WEBPAGE&apos; 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>
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.

Slide

unread,
Mar 9, 2020, 8:08:49 AM3/9/20
to Jenkins User Mailing List

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d8a4a7f9-8d50-4d69-808b-68791f48d7ee%40googlegroups.com.


--

Marky Jackson

unread,
Mar 9, 2020, 12:08:26 PM3/9/20
to Jenkins Users


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="emai...@2.66">
      <recipientList>alexan...@test.com</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 &apos;$WEBPAGE&apos; 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>
Reply all
Reply to author
Forward
0 new messages