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

How to disable automatic branch cleanup with bamboo yaml specs?

pBogey November 7, 2023

I have a plan where the branch settings are defined as:

branches: &branch_settings
create: for-new-branch
after-deleted-days: 3
after-inactive-days: 90
link-to-jira: true

And I want to override this for certain branches and disable the automatic cleanup. I have tried:

- ^(whatever.*)$:
<< : *branch_settings
delete: never

But this doesn't work.


From the UI I can uncheck a checkbox (Clean up plan branch automatically) in the specific plan branch configuration, but I don't know how to define it in the yaml spec and I didn't find it in the documentation.



Any suggestions? Thanks.

1 answer

1 accepted

3 votes
Answer accepted
Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 7, 2023

Hello pBogey,

Welcome to Atlassian community.

You can use the below examples to disable the expiry for branches using YAML specs

        disable-expiry: false
        disable-expiry: false

In this example I am overriding the branch properties for two branches one with a name of integration-branch and another any branch starting with the name of feature, you can probably modify this to meet your requirement.

**please don't forget to Accept the answer if your query was answered**


Shashank Kumar

pBogey November 7, 2023

That did the trick, thanks a lot. Seems it is documented as well, but I missed it.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events