开发者

Can Jenkins send mail notify with attachment?

开发者 https://www.devze.com 2023-03-25 06:19 出处:网络
can Jenkins send mail notify to recipients with attachments? What is more important for me (optional), it could also read from file *.开发者_开发技巧xls and add this to email text.

can Jenkins send mail notify to recipients with attachments? What is more important for me (optional), it could also read from file *.开发者_开发技巧xls and add this to email text.

Or can i add from my system variable to data, which is sending by plugin of jenkins (ext mail) ?


New answer, as of September 2011: Yes. Issue 9018 has been resolved.

Starting with version 2.15 of the Jenkins email-ext plugin, you can send attachments in Jenkins build notifications. See the Jenkins wiki here:

  • https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin


how I make a Jenkins send me an Email always with attached HTML file when the Jenkins trigger

1) press "Configuration"

Can Jenkins send mail notify with attachment?

2) in the top part of configuration press "Post-build Actions"

Can Jenkins send mail notify with attachment?

3) press on "add post build action " and choose "editable email notification"

Can Jenkins send mail notify with attachment?

4) after it been added enter "Project Recipient List" a emails you want to send (possible to add more than one mail , like in the example)

Can Jenkins send mail notify with attachment?

5) scroll down, add to the "Attachments" direction to the file you want to send

Can Jenkins send mail notify with attachment?

6) in the end of the page press on button "advanced settings" from the right side

Can Jenkins send mail notify with attachment?

  1. **add trigger to the sending email by the option you prefer **

Can Jenkins send mail notify with attachment?


This issue was recently posted on the Jenkins JIRA: Issue 9018. That site is not responding for me right now, so I can't even see what the status is.

Regarding the e-mails in the XLS file, I did a search of the Jenkins plug-ins and could not find anything for "XLS" or "Excel". If you're Jenkins instance is running on Windows, you could use VBScript and COM to either export the list to a parsable format like TAB or CVS; or you could try to programmatically look through the list for the e-mails and get the VBScript to return them as one big string. This forum has a pretty clear example of opening a workbook, selecting the appropriate worksheet, and then iterating through the cells: XLS & VBScript. Oh, and I just remembered that if you have newer versions of Visual Studio and Office, there's interoperability there that might be easier; though I've never tried that combo.

I hope this helps,
Zachary

0

精彩评论

暂无评论...
验证码 换一张
取 消