在Jenkins中使用Email-ext插件在邮件正文中显示HTML页面 [英] Display HTML page inside mail body with Email-ext plugin in Jenkins

查看:524
本文介绍了在Jenkins中使用Email-ext插件在邮件正文中显示HTML页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Jenkins的新手,我想知道如何显示在邮件正文(而不是附件)中成功构建之后生成的html报告(不是html代码).

I am new to Jenkins and i want to know how it is possible to display the html report (not the html code) generated after a successful build inside a mail body (not an attachment).

我想知道我应该遵循的确切步骤以及可能的果冻模板的内容.

I want to know the exact steps i should follow and what should be the content of my possible jelly template.

推荐答案

深入了解插件文档.此处无需常规.

Look deeper into the plugin documentations. No need for groovy here.

只需确保将内容类型设置为HTML,然后将以下内容添加到正文中即可:

Just make sure Content Type is set to HTML and add the following to the body:

${FILE,path="my.html"}

这会将my.html内容放置在您的电子邮件正文中(文件的位置是相对于作业的工作空间的.我使用它并且效果很好.

This will place the my.html content in your email body (location of file is relative to job's workspace. I use it and it works well.

我希望这会有所帮助.

请注意,您必须具有Jenkins版本 1.532.1 (或更高版本),才能通过email-ext插件支持此功能.

Note that you must have the Jenkins version 1.532.1 (or higher) to support this feature with the email-ext plugin.

这篇关于在Jenkins中使用Email-ext插件在邮件正文中显示HTML页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆