Bamboo remove unused build directories

I'm trying to find a way to identify "not recently used" build directories under bamboo-agent-home/xml-data/build-dir, so I can regularly delete those that have not been used in over a week to save disk space.

I know there's no functionality in the Bamboo UI to help with this, but is there a way I can get this information via the REST API?

2 answers

0 vote

Hi Richard,

Have you tried to use specific build result expiry or even global build result expiry?

I believe this would work best for you.

If this answer was helpful, please allow me to ask you to mark my answer as accepted in order to have it in the top of the thread, also helping other customers.

Thanks in advance!

Kind regards,
Felipe Kraemer

Hey Felipe,

I think you may be answering a slightly different question than the one he's answering. It's not the results that cause the pain. It's the working sources, jars and all that are used by the build process and which are stored in .../xml-data/build-dir/plan-key They aren't logs. They aren't artifacts or results or anything else which build expiry touches. They are working files which are never cleaned up.

I've taken to running a cron job for the build-dir directory which removes every top level directory which has an mtime of greater than two weeks. 

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,802 views 0 6
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you