如何将文件附加到Jenkins管道通知

era*_*iri 8 jenkins email-ext jenkins-pipeline

我正在尝试在管道中将文件附加到我的通知邮件.

我怎样才能做到这一点?一个例子很好.

hak*_*iri 20

email-ext使用Ant文件语法

至于用法:

emailext attachmentsPattern: '**/report.html', body: 'Find attachments', subject: 'test', to: 'test@me.org'
Run Code Online (Sandbox Code Playgroud)

  • AttachmentPattern 不接受所有文件路径?例如 ${workspace}/file.xml (2认同)
  • 您还可以添加特定的多个文件:attachmentsPattern: 'report.html, test.html,....' (2认同)