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?