我使用poll-mailbox-trigger-plugin根据传入的电子邮件触发Jenkins作业。解析Jenkins中的HTML
构建参数之一(pmt_content
)包含HTML中指定的电子邮件的正文。
是否有Jenkins插件可以解析HTML并检索用户指定标签的值?
邮件内容例如:
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8">
<title></title>
</head>
<body style='margin:20px'>
<p>The following user has registered a device, click on the link below to
review the user and make any changes if necessary.</p>
<ul style='list-style-type:none; margin:25px 15px;'>
<li><b>User name:</b> Test User</li>
<li><b>User email:</b> [email protected]</li>
<li><b>Identifier:</b> abc123def132afd1213afas</li>
<li><b>Description:</b> Tom's iPad</li>
<li><b>Model:</b> iPad 3</li>
<li><b>Platform:</b></li>
<li><b>App:</b> Test app name</li>
<li><b>UserID:</b></li>
</ul>
<p>Review user: https://cirrus.app47.com/[email protected]</p>
<hr style='height=2px; color:#aaa'>
<p>We hope you enjoy the app store experience!</p>
<p style='font-size:18px; color:#999'>Powered by App47</p><img alt='' src=
'https://cirrus.app47.com/notifications/562506219ac25b1033000904/img'>
</body>
</html>
具体来说,我怎么能检索的值 “标识” 标签?
我敢肯定我可以写一个脚本来做到这一点,但我宁愿Jenkins的逻辑。