Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Bamboo - Send email notifications to list generated by job

Hi,

I'm running a plan where there are tests in different areas. After the testing is done I can analyze the failing tests and determine which area they belong to.

Based on this I want to send a notification to the person responsible in each area.

My plan was to generate a recipients file in the job containing the recipients emails and use this for notification recipients, but this seems not to be possible.

Is there a way to generate notification recipients based on build/job output?

Thanks

1 answer

1 accepted

1 vote
Answer accepted
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 15, 2019

Hello Aske,

I see you are new here, please be welcome!

From Bamboo default notifications you are able to notify:

  • Users
  • Group of users (Bamboo groups)
  • Custom mail (that could be a list, or add multiple entries)
  • Responsible users
  • Committers
  • Watchers

If none of the options above works for you, then the option I see is using the terminal command (basically Unix approach) to send the email you need. 

To follow this approach you will need to solve three issues:

  1. Build a list of emails.
    Bamboo won't help you on this one. The best option here is to use an external list or try to grab the mails from the Bamboo DB manually.
  2. Decide in which condition you will send the notification.
    If you need to run only when something breaks then you will need a plugin to run a post-build command: Pre-Post Build Command Runner | Atlassian Marketplace
  3. Send the notification through terminal.
    You will probably find multiple solutions for this one. One of them is using Mutt. This is an example of this command on bash:
    mail_list="first@mail.address second@mail.address"
    mutt -e 'set content_type="text/html"' -s "subject" < mail_file.html $mail_list

I shared the option above, but I do see that it has multiple drawbacks to be actually used:

  • Generating the dynamic mail list can be challenging.
  • Running the mails command will require that your agent or Bamboo server has its mail server properly configured (not Bamboo, but the OS).

There is also an improvement request that may interest you: [BAM-17085] Send customized email via Bamboo Task.

This is more like an informative answer. I wish I could shed some light on your question.

Maybe using a Bamboo group could be simpler, with the drawback of sending emails to people that don't really need to receive them.

Thanks for the reply.

I'll go with the unix approach of sendings mails through the terminal.

Building the dynamic list isn't a problem for me, I'll probably just put some '.owners' files containing emails in the folder structure of our source, then read these if something fails.

Like Daniel Santos likes this
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 18, 2019

You are welcome!
I'm glad there was a workaround that serves to your purpose.

See you in the next thread!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events