Why are Jenkins “extended emails” not including extended information?

萝らか妹 提交于 2020-01-01 08:03:45

问题


We installed email-ext 2.24.1 into Jenkins 1.447. We set "Extended Email Notification" "Default Content" to

$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:

Check console output at $BUILD_URL to view the results.

Failed tests (regressions compared to previous builds): ${FAILED_TESTS, onlyRegressions=true}

Changes: ${CHANGES, showPaths=true, format="%a: %r %p \n--\"%m\", pathFormat="\n\t- %p"}

We went to a project, and selected "Editable Email Notification" and left the default settings, where "Default Subject" says $DEFAULT_SUBJECT and "Default Content" says $DEFAULT_CONTENT.

In emails that come out, it's as if email-ext doesn't exist. I just see build information, nothing about the tests that failed or the changes since last success.

Why do the emails not show Failed tests and Changes? And how do I debug this? Are there logs somewhere showing what is getting run?

Edit: I added "HALLOO" to the project "Default Content". Didn't show up.

Screenshot of the email portion of the global configuration:

Screenshot of the email portion of the job configuration page:


回答1:


In the Post build actions section, delete the E-mail notification altogether. This will ensure your instance is using only Editable email notification

This is possible in my version (1.477), not sure when this function of adding/deleting post-build actions released.




回答2:


You need to un-check the box for default email notifications and then add your recipients list to the extended email configuration. Using the $DEFAULT_RECIPIENTS will only work if you have configured defaults.




回答3:


There are several issues. First, you need to add a default recipient in the global config screen. The per job configuration is broken. The author claims it should not appear anymore, but it still does in the latest version.

Second, you should try specifying the content in the per job box. Delete the $DEFAULT_CONTENT and replace it with your template.

In my install, I was able to get it to work by doing that. I also had to hit advanced (in the per job config) and explicitly set triggers before it would send me email.

I've had trouble getting unit test failures to print, but CHANGES works.




回答4:


In the job configuration page, go to the Editable Email Notification section. At the bottom of this section you can add triggers via a dropdown box you get after you've clicked on the Advanced... button. When I first configured the email notifications, there was no trigger defined, and no email was sent out.

If you always want an email sent out, use the Before build trigger. Then add a checkbox to determine the recipients of the email for this trigger. If you want all email addresses in $DEFAULT_RECIPIENTS, then click the checkbox at Send To Recipient List.



来源:https://stackoverflow.com/questions/12748411/why-are-jenkins-extended-emails-not-including-extended-information

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!