Updated Jenkins to 1.596, and update to EmailExt 2.39 And have the following dependencies installed token-macro - 1.10 script-security - 1.12 mailer - 1.12
The issue is we have some custom email templates, when the email is sent The logs for Jenkins and the error sent in the email are below. Changed the name of the template being used to groovy-html.template And the emails were sent successfully. Why can't custom named templates be used anymore? There are no errors in the Jenkins log *22:44:32* Checking if email needs to be generated*22:44:32* Email was triggered for: Success*22:44:32* Sending email for trigger: Success*22:44:32* NOT overriding default server settings, using Mailer to create session*22:44:32* messageContentType = text/html; charset=UTF-8*22:44:32* Adding recipients from project recipient list*22:44:32* Adding recipients from trigger recipient list*22:44:32* Successfully created MimeMessage The email that gets sent has the following errors Exception raised during template rendering: java.io.FileNotFoundException: /var/lib/jenkins/workspace/Product1 (Is a directory) java.io.IOException: java.io.FileNotFoundException: /var/lib/jenkins/workspace/Product1 (Is a directory) at hudson.remoting.FastPipedInputStream.read(FastPipedInputStream.java:169) at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:282) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:324) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:176) at java.io.InputStreamReader.read(InputStreamReader.java:184) at java.io.Reader.read(Reader.java:140) at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2001) at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1980) at org.apache.commons.io.IOUtils.copy(IOUtils.java:1957) at org.apache.commons.io.IOUtils.copy(IOUtils.java:1907) at org.apache.commons.io.IOUtils.toString(IOUtils.java:778) at org.apache.commons.io.IOUtils.toString(IOUtils.java:759) at hudson.FilePath.readToString(FilePath.java:1842) at hudson.FilePath$readToString$0.call(Unknown Source) at SimpleTemplateScript12.run(SimpleTemplateScript12.groovy:29) at groovy.text.SimpleTemplateEngine$SimpleTemplate$1.writeTo(SimpleTemplateEngine.java:165) at groovy.text.SimpleTemplateEngine$SimpleTemplate$1.toString(SimpleTemplateEngine.java:177) at hudson.plugins.emailext.plugins.content.ScriptContent.renderTemplate(ScriptContent.java:216) at hudson.plugins.emailext.plugins.content.ScriptContent.evaluate(ScriptContent.java:85) at org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro.evaluate(DataBoundTokenMacro.java:189) at org.jenkinsci.plugins.tokenmacro.TokenMacro.expand(TokenMacro.java:182) at org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(TokenMacro.java:233) at hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:72) at hudson.plugins.emailext.ExtendedEmailPublisher.getContent(ExtendedEmailPublisher.java:659) at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:538) at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:306) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:297) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:244) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734) at hudson.model.Build$BuildExecution.cleanUp(Build.java:192) at hudson.model.Run.execute(Run.java:1805) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Caused by: java.io.FileNotFoundException: /var/lib/jenkins/workspace/Product1 (Is a directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream. (FileInputStream.java:146) at hudson.FilePath$33.invoke(FilePath.java:1749) at hudson.FilePath$33.invoke(FilePath.java:1742) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2677) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:324) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c3f481e3-ea9d-40e8-87a6-bb5b1a560a1f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
