我需要在电子邮件中添加一个图像作为电子邮件正文而不是附件,从 Jenkins 通过管道。我在 Jenkins 管道中使用 emailext 插件,下面是我正在使用的代码。
emailext (
subject: "test email",
body: """
<html>
<body>
<p>please find attached score: Job '${env.JOB_NAME}':</p>
<p> The last commit was by ${last_commit_user} </p>
<p>Please check jenkins console at "</p>
<p> For detailed report on this analysis, visit "</p>
</body>
</html>
""",
to: email_recipients,
attachmentsPattern: '${BUILD_NUMBER}.jpg'
)
Run Code Online (Sandbox Code Playgroud)
我不想使用作为附件的 "attachmentsPattern" ,我尝试使用,
body: """
<html>
<img src="image_name.jpg" >
</html>
"""
Run Code Online (Sandbox Code Playgroud)
这只是我电子邮件中的蓝色框,我提供了相对于我的 Jenkins 工作区的正确图像路径,我尝试搜索相关解决方案但徒劳无功。
html jenkins jenkins-plugins jenkins-pipeline jenkins-email-ext
我需要在bash shell中以相反的顺序打印一个字符串.
[deeps@host1:~]echo maps.google.com|rev
moc.elgoog.spam
[deeps@host1:~]
Run Code Online (Sandbox Code Playgroud)
但我需要它作为"com.google.maps".对于由句点(.)分隔的任何字符串,我通常需要它.
它应该以相反的顺序打印.我怎么做?
我也需要Perl中的解决方案.