簡體   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