Reputation: 399
I have Jenkins job which run auto tests on server and send result to email in html formt. HTML report page copied to ftp using comands
robocopy \\%vm%\TEST_AT\AT-Tool_%build% .\TA\ *.html *.version /NFL /R:1
robocopy "\\%vm%\TEST_AT\AT-Tool_%build%\report" "\\ftp\ftp\Projects\TA\CI-results\cd%drop%_patch\%BUILD_NUMBER%" /E
HTML report contains links to png images like:
file://ftp/ftp/Projects/TA/CI-results/cd14_patch/185/detailed_report_2-TC__dataset1/pages/screenshots/screen-thread-24-1420740565855.png
HTML report is generated by Java code and images path is a variable
I need to attach this .png
files in email with HTML report which send my Jenkins job.
Is it possible to improve my Jenkins job for sending email with such attachments?
Upvotes: 0
Views: 229
Reputation: 866
You can add a post build step in Jenkins witch will create a ZIP archive.
I my project I'm using shell script for it:
zip -r ${reports_version}.zip docs source
And for e-mail you can use jenkins e-mail ext plugin
https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin
It allows you to attache files to e-mail notifications.
Hope this helps.
Upvotes: 1