I'm running Jenkins controller on ECS, and agent node is run on fargate.
pipeline {
agent {
node {
label 'agent-fargate'
}
}
...
and when test stage failed, I want to send email with groovy template.
I have template file, and I can access with ssh ECS node, but I can't modify the jenkins controller's container image (for now).
I put the template file in resources/common/allure-report.template
in shared library code, and write it to agent in job(writeFile(file: "${env.JENKINS_HOME}/email-templates/allure-report.template", text: libraryResource("common/allure-report.template"))
)
The file wrote succesfully, but emailext
plugin can't find that file.
I put the template file in /var/jenkins_home/email_templates/allure-report.template
using scp
and docker cp ---
, and it works.
but When Jenkins Controller rebooted, the file is removed, (and as I said, I can't modify container image at now.)
So I want to use email template file which in shared library's repository.
How Can I do that?