我想做的是在每次构建后向用户发送电子邮件,并带有指向该项目/分支扫描的Sonarqube服务器的链接。
def sendEmailAfterSonarScan() {
soanrUrl = "http://lcoalhost:8080"
{ steps, domain, config ->
steps.emailext(to: "email@mydomain.com", body: '$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS - $BUILD_URL ' + 'Please click the following link to view Sonar Report $sonarUrl', mimeType: 'text/html', subject: 'Sonar Report')
}
}
,但是该方法在管道中失败,错误$ sonarUrl无法识别。我究竟做错了什么 ? 我不懂常规,但是怀疑是双引号还是三引号?