Deletes a plan branch instantly in Atlassian Bamboo when the corresponding branch is deleted in Stash / Bitbucket Server
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
.travis.yml
LICENSE
README.md
pom.xml
sonar-project.properties

README.md

Plan Branch Terminator for Bamboo

Build Status Latest Version License

Deletes a plan branch instantly in Atlassian Bamboo when the corresponding branch is deleted in Stash / Bitbucket Server

No plan branch is left behind!

Hasta la vista, plan branch!

Download

Get it from the releases tab and download the plan-branch-terminator-x.x.x.jar file.

Motivation

While Bamboo allows the automatic deletion of plan branches since version 5.9 (see feature request BAM-13129), this does not happen instantly when the source branch of a repository a plan branch targets is deleted. The deletion of the plan branch including its artifacts, logs and other data is done during a clean-up procedure for which the interval can be configured in the plan branch settings in Bamboo:

https://jira.atlassian.com/browse/BAM-13129

Until the deletion, the plan branches will remain in Bamboo as inactive plan branches:

inactive-planbranch

While not deleting the plan branches immediately is by design (you still might want to have access to the produced artifacts, logs, etc. for a certain period), there are customers that make heavy use of branches (e.g., by adopting git-flow) that want to have these plan branches being deleted instantly. Also, there is no possibility to configure the plan branch deletion settings globally, so you have to configure this for every plan of your Bamboo instance separately.

This is where our little Bamboo plug-in comes in: without any configuration it will delete plan branches instantly when it detects that a referenced branch got deleted in Stash / Bitbucket Server. And this will also work for users having a Bamboo version older than 5.9.

Word of caution

Deleting a plan branch will irrevocably delete all configurations, artifacts, logs and results related to this plan branch in Bamboo! Please also note that - even though we have tested this plug-in properly - its use is at your own risk. We are not responsible for any damage or data loss incurred with its use. So please use this in one of your testing environments first before adapting it on your production instance.

Author

https://www.mibexsoftware.com