Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-26478

Store Content Token Email Body In A File So It Can Be Reused In Other Jobs



    • Similar Issues:


      I've been trying to setup a few jobs with the email-ext plugin to get a more detailed email report for each build. The email-ext plugin is currently configured to have all of the Content Token content in the Default Content field. The content is the same in all of them and I would like to store the template in a file and reference that file in the jobs.

      I havent' been able to determine if this is possible based on the documentation or from related questions on stackoverflow and other sites.

      It seems like the only way to use a file based template is to use the




      tags pointing to a file in $JENKINS_HOME/email-templates or the Config File Plugin with the "managed:" prefix. When using either of those tags with a simple Content Token formatted template I get multiple parsing errors (unexpected token) trying to evaluate them as either Groovy or Jelly. This same content parses just fine when used in the Default Content field.

      I don't have any need for Jelly or Groovy at this point, I just want to reuse the same Content Token formatted template in multiple jobs.

      Is what I'm trying to do possible? If it is, could the documentation be updated to refelct how to store, format, and refernece that kind of template in a job?



          timmyleahy Timmy Leahy created issue -
          slide_o_mix Alex Earl made changes -
          Field Original Value New Value
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 160546 ] JNJira + In-Review [ 196473 ]


            slide_o_mix Alex Earl
            timmyleahy Timmy Leahy
            0 Vote for this issue
            3 Start watching this issue