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

Email Template Testing can't find passed Jelly script file

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: email-ext-plugin
    • Labels:
      None
    • Environment:
      OS: Windows 7
      Jenkins: 1.516
      Email-ext: 2.30.2
    • Similar Issues:

      Description

      Newly implemented Email Template Testing feature doesn't work for Jelly scripts.

      If name of template file is passed with extension following error occurs:

      Jelly script [myscript.jelly] was not found in $JENKINS_HOME/email-templates.

      If name of template file is passed without extension following error occurs:

      Template [myscript] was not found in $JENKINS_HOME/email-templates.

      additionally a validation error is shown:

      The file 'myscript' does not exist

      The problem is that EmailExtTemplateAction.doTemplateFileCheck() and EmailExtTemplateAction.renderTemplate() methods expect that template name includes extension. But JellyScriptContent.getTemplateInputStream() expects that template name doesn't contains extension.

        Attachments

          Activity

          Hide
          slide_o_mix Alex Earl added a comment -

          Email-ext uses that plugin to allow users to store templates inside Jenkins. You would want this plugin https://wiki.jenkins-ci.org/display/JENKINS/Managed+Script+Plugin for the GUI to manage the files.

          Show
          slide_o_mix Alex Earl added a comment - Email-ext uses that plugin to allow users to store templates inside Jenkins. You would want this plugin https://wiki.jenkins-ci.org/display/JENKINS/Managed+Script+Plugin for the GUI to manage the files.
          Hide
          thekbb Kevin Behrens added a comment - - edited

          @Alex Earl , Can you expound upon using he 'config file plugin to contain your templates'? This sounds like sauce I need to have.

          Were you referring to the Config+File+Provider+Plugin? From the wiki, it say it

          Adds the ability to provide configuration files (i.e., settings.xml for maven, XML, groovy, custom files, etc.) loaded through the Jenkins UI which will be copied to the job's workspace.

          I am missing something, as that would allow me to put the template on the slave, where it won't be used.

          Show
          thekbb Kevin Behrens added a comment - - edited @Alex Earl , Can you expound upon using he 'config file plugin to contain your templates'? This sounds like sauce I need to have. Were you referring to the Config+File+Provider+Plugin ? From the wiki, it say it Adds the ability to provide configuration files (i.e., settings.xml for maven, XML, groovy, custom files, etc.) loaded through the Jenkins UI which will be copied to the job's workspace. I am missing something, as that would allow me to put the template on the slave, where it won't be used.
          Hide
          slide_o_mix Alex Earl added a comment -

          Your templates should never go into the path you mention. Please review the documentation on where to put templates. With the most recent version of the plugin you can also use the managed config file plugin to contain your templates.

          Show
          slide_o_mix Alex Earl added a comment - Your templates should never go into the path you mention. Please review the documentation on where to put templates. With the most recent version of the plugin you can also use the managed config file plugin to contain your templates.
          Hide
          awilliams Angel Williams added a comment -

          ok I upgraded Jenkins from 1.504 to 1.546 recently and upgraded the EmailExt Plugin from 2.27.1 to what ever is available now.

          I luckily had a snapshot of the server prior to upgrade and can say that after the upgrade all my templates were missing from this path:
          C:\Jenkins\plugins\email-ext\WEB-INF\classes\hudson\plugins\emailext\templates

          So is there a proper way to upgrade this plugin without loosing my templates and the ability to send email post build?

          Show
          awilliams Angel Williams added a comment - ok I upgraded Jenkins from 1.504 to 1.546 recently and upgraded the EmailExt Plugin from 2.27.1 to what ever is available now. I luckily had a snapshot of the server prior to upgrade and can say that after the upgrade all my templates were missing from this path: C:\Jenkins\plugins\email-ext\WEB-INF\classes\hudson\plugins\emailext\templates So is there a proper way to upgrade this plugin without loosing my templates and the ability to send email post build?
          Hide
          slide_o_mix Alex Earl added a comment -

          Then it some how got removed during your upgrade process, which has nothing to do with email-ext.

          Show
          slide_o_mix Alex Earl added a comment - Then it some how got removed during your upgrade process, which has nothing to do with email-ext.

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              ddbear Volodja Medvid
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: