带有变量和html主体的Jenkins EmailExt插件

时间:2018-11-02 22:28:27

标签: jenkins jenkins-plugins jenkins-pipeline email-ext jenkins-email-ext

下面是我的詹金斯管道发送电子邮件 问题是我体内有一些params.variables,我需要使用它们才能替换它们,我需要使用“”“ 我还有一个HTML文件,该文件附在正文中,需要使用''

有什么方法可以将两者结合在体内吗?下面的代码给出了意外的令牌文件,如果我将“替换为”,则params变量不会被替换

               emailext ( 
                                      mimeType: "text/html",
                                      to: 'srav',
                                      subject: "Job '${env.JOB_BASE_NAME}' (${env.BUILD_NUMBER}) is waiting for approval",
                                      body: """<p>Hi</p><p>Defect ${params.DE_NUMBER} is waiting for approval</p><p>${FILE,path="/atm/com/def/de_1886.html"}</p><p>Please go to console output of "<a href="${env.BUILD_URL}/input">${env.BUILD_URL}input</a>" to <font color="green"> Approve</font> or <font color="red">Reject</font> </p><p>Thank You</p><p>DEVOPS TEAM</p>""",
                                      recipientProviders: [[$class: 'DevelopersRecipientProvider'],[$class: 'RequesterRecipientProvider']]
                                      )

0 个答案:

没有答案