繁体   English   中英

jenkins email-ext 插件的零星问题

[英]sporadic issue with jenkins email-ext plugin

我使用 email-ext (v2.57.2) 在 jenkins 管道作业中设置了电子邮件通知。 电子邮件在前几次迭代中发送良好,但在大约第 4 次执行后,出现以下错误(并且在所有后续运行中继续发生):

> [Pipeline] emailext messageContentType = text/html; charset=UTF-8
> Adding recipients from project recipient list Adding recipients from
> trigger recipient list Successfully created MimeMessage An attempt to
> send an e-mail to empty list of recipients, ignored. Some error
> occured trying to send the email...check the Jenkins log

不太确定要查看哪个 Jenkins 日志...

发现它与 $class 的使用有关:“RequesterRecipientProvider。当一个作业以预定的方式运行时,这个值出现为 null。只有当作业手动运行时,它才会被填充。

最终切换 Jenkinsfile 以使用 jenkins 环境变量。

def emailRecipients = "${env.EMAIL_RECIPIENTS}";
emailext (subject: subject, body: details, to: emailRecipients)

此问题的另一个潜在原因是在多分支管道作业的高级克隆行为中启用了浅克隆选项。 使用此选项,即使不是所有的emailext收件人提供程序也可能是空的,即使作业是由破坏构建的提交触发的。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM