【发布时间】:2017-12-14 02:54:51
【问题描述】:
如果 groovy 脚本输出为真,我需要触发电子邮件通知,
我这样做是通过添加一个脚本 - 在构建触发器到电子邮件外部触发器并将我的脚本作为 ${SCRIPT, template="myscript.groovy"} 在脚本 - 构建之后 - > Groovy 脚本块中,
保存此配置后出现此错误。
startup failed:
Script1.groovy: 1: unexpected token: SCRIPT @ line 1, column 3.
${SCRIPT, template="myscript.groovy"}
^
1 error
我是从电子邮件分机网站获得的
使用模板参数等于你的脚本标记 模板文件名,或者另外的脚本参数等于 自定义脚本名称。例如,如果模板文件名是 foobar.template,电子邮件内容看起来像这样 ${SCRIPT, 模板="foobar.template"}。
https://wiki.jenkins.io/display/JENKINS/Email-ext+plugin#Email-extplugin-Scriptcontent
【问题讨论】: