我们已经配置了Jenkins-可编辑的电子邮件通知模板,以便在每次构建后发送自定义的电子邮件。
我们做了什么 :
*Jenkins -> Manage Jenkins -> Editable Email Notification Templates-> Add New Template*
"Default Content"
" /> BUILD ${build.result} URL ${rooturl}${build.url} Project: ${project.name} Date: ${it.timestampString} Duration: ${build.durationString} Cause: ${cause.shortDescription}
" /> BUILD ${build.result} URL ${rooturl}${build.url} Project: ${project.name} Date: ${it.timestampString} Duration:
${build.durationString} Cause: ${cause.shortDescription}
问题 :环境变量(例如“ build.result”,“ build.url”等)作为变量名(而不是实际值)出现。我们在这里缺少什么吗?
得到了解决方案:)我们需要在“默认内容”部分中将其指定为$ {JELLY_SCRIPT,template =“ Jelly脚本名称”},并将脚本放置在JENKINS主页“电子邮件模板”文件夹下