试图让jenkins将自述文件包含为管道附件
stage('email Alex!'){
mail(
body: 'your component is released',
attachmentsPattern: '**/*.md',
from: env.DEFAULT_REPLYTO,
replyTo: env.DEFAULT_REPLYTO,
subject: 'README',
to: 'alexander.lovett@bt.com'
)
}
在这个测试中,dir结构是:
--currentDir
|--Project
|--README.md
我刚收到一封关于身体的电子邮件但没有附件:/ 有谁知道怎么做?
答案 0 :(得分:1)
你应该安装这个插件:
https://wiki.jenkins.io/display/JENKINS/Email-ext+plugin
用这个替换你的代码:
stage('email Alex!'){
emailext(
body: 'your component is released',
attachmentsPattern: '**/*.md',
from: env.DEFAULT_REPLYTO,
replyTo: env.DEFAULT_REPLYTO,
subject: 'README',
to: 'alexander.lovett@bt.com'
)
}