【问题标题】:sporadic issue with jenkins email-ext pluginjenkins email-ext 插件的零星问题
【发布时间】:2017-10-19 01:25:39
【问题描述】:

我使用 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 日志...

【问题讨论】:

  • 如果我更改 jenkins 作业配置中的任何内容,它会重新运行几次,然后再次开始失败

标签: jenkins jenkins-plugins email-ext jenkins-email-ext


【解决方案1】:

发现它与 $class 的使用有关:“RequesterRecipientProvider。当作业以预定方式运行时,此值显示为 null。仅当手动运行作业时才会填充它。

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

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

【讨论】:

    【解决方案2】:

    此问题的另一个潜在原因是在多分支管道作业的高级克隆行为中启用了浅克隆选项。使用此选项,即使不是所有的emailext 接收者提供者,大部分(如果不是全部)都可能出现空置,即使作业已由破坏构建的提交触发。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-06-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多