I'm using Jenkins with Email-Ext plugin to automate PHP Unit Testing. If the tests failed I want to send a notification email to myself including the zipped test reports.
The Email-Ext plugin requires an Ant Fileset definition in the attachment field. The zipped test report can be found here:
D:\Test_Reports\test-report-failed.zip
I can't find a working example of the use of fileset
with absolute path to a single file.
I tried the following but didn't work:
<fileset file="D:\Test_Reports\test-report-failed.zip" />
Could find any example of using absolute paths but relative paths only.
This is the official help from the Email-ext plugin about the attachment field:
This is the set of attachments that will be used for the email. The format is a comma separated list of Ant include file syntax. The base directory is the workspace.
I solved it by changing the Jenkins Job's workspace to the directory where are the test reports and other resources located. Then I was using relative addressing to the zip file like: test-report-failed.zip