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

Enable use of managed files for templates

    Details

    • Similar Issues:

      Description

      At the moment in order to use a content template the script must be copied into the folder $JENKINS_ROOT/email-templates, which requires filesystem access to the master.
      As an alternative I want to be able to create a managed file (using the Config File Provider plugin) and then reference that file when configuring editable email notification build step.

        Attachments

          Activity

          Hide
          slide_o_mix Alex Earl added a comment -

          Added information on the managed: syntax to the help for the SCRIPT and JELLY_SCRIPT tokens.

          Show
          slide_o_mix Alex Earl added a comment - Added information on the managed: syntax to the help for the SCRIPT and JELLY_SCRIPT tokens.
          Hide
          slide_o_mix Alex Earl added a comment -

          Good idea, I'll do that.

          Show
          slide_o_mix Alex Earl added a comment - Good idea, I'll do that.
          Hide
          walterk82 Walter Kacynski added a comment -

          Can you update the token help to include the "managed:" syntax?

          Show
          walterk82 Walter Kacynski added a comment - Can you update the token help to include the "managed:" syntax?
          Hide
          slide_o_mix Alex Earl added a comment -

          Added ability to use managed files for both Groovy and Jelly templates. To use the template you specify it like this:

          ${JELLY_SCRIPT, template="managed:TEMPLATE NAME"}
          ${SCRIPT, template="managed:TEMPLATE NAME"}

          Note, it is the NAME of the config item, not the ID. Two new types of managed files are available in the "managed config file" area for each of the above content tokens.

          Show
          slide_o_mix Alex Earl added a comment - Added ability to use managed files for both Groovy and Jelly templates. To use the template you specify it like this: ${JELLY_SCRIPT, template="managed:TEMPLATE NAME"} ${SCRIPT, template="managed:TEMPLATE NAME"} Note, it is the NAME of the config item, not the ID. Two new types of managed files are available in the "managed config file" area for each of the above content tokens.
          Hide
          slide_o_mix Alex Earl added a comment -

          This is still a work in progress...didn't think about the commit message all the way apparently.

          Show
          slide_o_mix Alex Earl added a comment - This is still a work in progress...didn't think about the commit message all the way apparently.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Alex Earl
          Path:
          pom.xml
          src/main/java/hudson/plugins/emailext/JellyTemplateConfig.java
          src/main/java/hudson/plugins/emailext/plugins/content/JellyScriptContent.java
          src/main/resources/hudson/plugins/emailext/JellyTemplateConfig/JellyTemplateConfigProvider/newInstanceDetail.jelly
          src/main/resources/hudson/plugins/emailext/JellyTemplateConfig/JellyTemplateConfigProvider/newInstanceDetail.properties
          src/main/resources/hudson/plugins/emailext/JellyTemplateConfig/edit-config.jelly
          http://jenkins-ci.org/commit/email-ext-plugin/9c8e0ac16c440293728a5f7343993857c5f47b00
          Log:
          Fix JENKINS-18203

          Implement support for managed files as templates.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: pom.xml src/main/java/hudson/plugins/emailext/JellyTemplateConfig.java src/main/java/hudson/plugins/emailext/plugins/content/JellyScriptContent.java src/main/resources/hudson/plugins/emailext/JellyTemplateConfig/JellyTemplateConfigProvider/newInstanceDetail.jelly src/main/resources/hudson/plugins/emailext/JellyTemplateConfig/JellyTemplateConfigProvider/newInstanceDetail.properties src/main/resources/hudson/plugins/emailext/JellyTemplateConfig/edit-config.jelly http://jenkins-ci.org/commit/email-ext-plugin/9c8e0ac16c440293728a5f7343993857c5f47b00 Log: Fix JENKINS-18203 Implement support for managed files as templates.

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              tyrius Jonathan Zimmerman
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: