Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to attach artifacts in an email notification in Bamboo?

Tags:

bamboo

We have a plan that produces an executable artifact. Is there a way to tell bamboo to email those artifacts as attachments in a build notification? For the record we're using atlassian on-demand.

like image 246
Joe Avatar asked Feb 28 '13 20:02

Joe


2 Answers

You can send a email from a bash script using sendmail here is a quick tutorial. You can then just include the artifact link in the email

like image 83
Johan de Klerk Avatar answered Jan 02 '23 10:01

Johan de Klerk


No wonder Bamboo still didn't have this fixed and we are in 2019 and this request was from 2013. We do have a html report that we want to send along with Notification email from Bamboo.

But we were told its not possible in Bamboo. So we came up with a final task in our build which runs a powershell script that sends email with the html report we generate.

Send-MailMessage -SmtpServer smtp.yourcompanydomain.com -Port 25 -To $toEmail -From $fromEmail -Subject $subject -Body $message -BodyAsHtml -Attachments report.html -Credential $mycreds

You have to declare variables like $toEmail, like $toEmail = "[email protected]" $mycreds = credentials for account from which you are sending

like image 31
Ratnakar Avatar answered Jan 02 '23 10:01

Ratnakar