简体   繁体   English

Jenkins电子邮件通知和GIT

[英]Jenkins Email Notification and GIT

I'm new to Jenkins and I need to change the content of the default email notifications such that in addition to the default message they'll also show the GIT_AUTHOR and GIT_MESSAGE and possible some statistics about the various tests. 我是Jenkins的新手,我需要更改默认电子邮件通知的内容,以便除默认消息外,它们还将显示GIT_AUTHOR和GIT_MESSAGE以及有关各种测试的一些统计信息。

From my little research I understand that there are some plugins that might help me such as Email-ext plugin, Email-ext Template Plugin, Git Changelog Plugin. 从我的小小的研究中,我了解到有些插件可以为我提供帮助,例如Email-ext插件,Email-ext模板插件,Git Changelog插件。 The concise documentation of the plugins didn't help me that much. 插件的简洁文档对我没有太大帮助。 Is there any way to achieve my goal using one of these plugins, and if so, how? 使用这些插件之一,有什么方法可以实现我的目标,如果可以,怎么办? If not, I assume I should do it with Groovy. 如果没有,我认为我应该使用Groovy。 In this case, how to obtain the contents of GIT_AUTHOR and GIT_MESSAGE using Groovy? 在这种情况下,如何使用Groovy获取GIT_AUTHOR和GIT_MESSAGE的内容?

Thanks. 谢谢。

The token you can use in the email-ext plugin get dynamically extended by various plugins, see Token Macro Plugin , token producer section. 您可以在email-ext插件中使用的令牌由各种插件动态扩展,请参见“ 令牌宏插件”中的“令牌生成器”部分。

Install those git related plugins and consult the content token reference by clicking the ? 安装那些与git相关的插件,并通过单击来查询内容令牌参考 just after the Attach build log combobox at the email content configuration, if i remember correctly author and message should be aviable. 在电子邮件内容配置的“附加构建日志”组合框之后,如果我没记错的话,作者和邮件应该是可用的。

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

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