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

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

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

Is there a trigger or notifcation when plan branch is removed? Edited

Does anyone have an idea of how to trigger an action when a build plan branch is automatically removed by Bamboo?

I've setup a branch build plan that also deploys each branch to Tomcat by adding the branch name to the context name, like website-branch1, website-branch2 which works fine.

But when the branch is deleted in BitBucket and Bamboo automatically deletes the branch from the build plan, the deployed instance of the branch is still in tomcat.

I could write code to query the build plan for the branches, keep it as an external list and anytime it finds one that is no longer in bamboo delete that one from tomcat and remove it from the list. 

Is there a better way to do it?

1 answer

Deployment is done by a build and there is no build triggered when a branch is deleted. So, you need to do it either by maintaining it externally or in a Bamboo add-on that captures branch deletions.

What is your title suggesting about a limitation of 5 branches? That is not the case in Bamboo. Unless you have some expiry rules set up, branches won't be automatically removed. When a bitbucket branch is deleted, the corresponding Bamboo branch will be deleted though.

Title was an accident, I corrected it.  Having an issue with IE.

I know the deletion doesn't trigger a build, was trying to find information on events.

Looking into it further I found some information on Bamboo Event Listeners.  It documents a BuildDeletedEvent and MutipleJobsDeletedEvent which is probably what I'm looking for. 

Yes, that is what you need. You will need an add-on that implements a listener for that event.

Suggest an answer

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

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

695 views 1 6
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