Details
-
Bug
-
Status: Resolved (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
OS: Windows 7
Jenkins: 1.516
Email-ext: 2.30.2
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.
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.