I want to attach these files as a zip archive:
And this is what I did:
emailext([
attachLog: true,
subject: 'Hello World',
recipientProviders: [developers(), requestor()],
to: '$DEFAULT_RECIPIENTS',
body: "hello world",
compressLog: true,
mimeType: 'text/html',
])
Unfortunately this is attaching the whole console.log
(into a zip called build
).
How can I fix this?
Use attachmentsPattern
parameter instead of attachLog
. You are giving Jenkins too much credit if you expect it to figure out that build
folder contains files with .log
extension and that's what you meant by "attachLog".