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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to setup notifications for a Bamboo Deployment plan that hangs up? Edited

Similar to what happens on the Bamboo Plans, I'd like that my deployment plans to notify me by email every time a deployment hangs up.

Is that possible?

 

Thanks.

  Pedro Rosas

1 answer

1 vote

Hello Pedro. Thanks for your inquiry.

When mentioning build plan notifications, you likely speak about the build notification "Job hung". Please find this, along with all other build notification options sketched in the following KB:

https://confluence.atlassian.com/bamboo/configuring-notifications-for-a-plan-and-its-jobs-289276973.html 

With regards to deployment notifications, this is the related KB:

https://confluence.atlassian.com/bamboo/notifications-for-deployment-environments-342754193.html 

Deployment notifications are not configured on deployment project level, but inside each deployment environment of a deployment project. So to add a deployment notification, you need to open a deployment environment per "Edit environment" (pencil symbol on the right) on the "Deployment projects" page and there press button "Notifications" and then "Add notification".

The selectable notification events are "Deployment started and finished", "Deployment finished" (according to the above KB) and also "Deployment failed" which is missing out in the document from above (our sincere apologies for that).

Now failing is not hanging, but if a deployment is kicked off and never finishes, it kind of fails. So in order to receive the hanging information, I see basiaclly two options for you:

  1. You notify the wished recipient per the opposite, namely "Deplyment finished". That means, whenever a deployment was triggered but hangs, this notification is NOT received. So it's the reverse logic of what you wanted to have, but e.g. some Bamboo-external scripting might turn it into what you aim to receive.
  2. You'd need to identify if the deployment is hanging (for which I will point you to a Bamboo REST endpoint that will show you if a deployment is queued and waiting. So queries on that for a defined and long enough time e.g. per Bamboo Script task within your deployment, without any status change, should indicate hanging) and if so, make the deplyment fail e.g. per exit(1) from the same or another Bamboo Script task. If your deployment notification event was set to "Deployment failed", this would now effectively call out this deployment as hanging.

Please find details of Bamboo's RESTful API in our Bamboo REST API Tutorial https://docs.atlassian.com/atlassian-bamboo/REST/6.8.1/  and the endpoint that I mentioned above below. It uses the GET method, of course.

/queue/deployment?expand

Are either option 1 or 2 from above applicable for you? We hope so.

Please let us know if there is more that we can assist you on here.

Thanks and cheers,
Gerhard

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.2 is here!

I'm happy to announce that Bamboo 7.2 has been released and it’s overflowing with awesome new features. This will be the last major Server release before the launch of Bamboo DC. Bamboo logs We...

534 views 6 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you