Jenkins Email-ext: Attach Build Log not working

亡梦爱人 提交于 2019-12-11 11:38:45

问题


I'm trying to use Email-ext (Version 2.27.1) with Jenkins (Version 1.508) to send an email when a build fails, to the committers who had worked on the project since the last success.

I'd like to also attach the build log to the email, and I see and check the "Attach Build Log" button, but whenever I click Save or Apply, and go back in to the configuration, the button is unchecked again. What's going on and how can I fix this?


回答1:


This was a bug in email-ext 2.27.1 and is fixed in 2.28 (Released today, if you'd believe it.)

See Version History Here




回答2:


We are probably using a bit older version of the email-ext on our system, so it doesn't have this option available.

Alternatively you can use the following variable in addition to the default content of the message: $BUILD_LOG

This will not display the log content correctly if you are using html as content type (doesn't show new lines correctly) but it will work fine with the Text content type.

For the html you can have a customizable content using Jelly Scripts. There are some default examples that will display at least the final part of the Build Log.



来源:https://stackoverflow.com/questions/15813494/jenkins-email-ext-attach-build-log-not-working

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