Allow loading templates from shared-library.

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      It would be great if we could send in a shared-library resources that is our Email Ext. template, or if we could send in a body (as a string) to be processes as groovy or jelly.

      For example, rather then the following call:

        emailext subject: '$DEFAULT_SUBJECT',
                 attachLog: attachLogs,
                 body: 'This is our email body',
                 recipientProviders: [developers(), requestor()]
      

      We could do something like:

        // This is a shared-library resource file.
        def mailContent = libraryResource('resources/email/template.groovy')
        emailext subject: '$DEFAULT_SUBJECT',
                 attachLog: attachLogs,
                 body: mailContent,
                 bodyType: 'groovy',
                 to: additionalRecipients,
                 recipientProviders: [developers(), requestor()]
      
      

            Assignee:
            Unassigned
            Reporter:
            Mike Delaney
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: