Bamboo plan build agent agent choice based on agent disk free

Hi,

I have a build farm here, where several hosts are configured to build the same plan (building it takes pretty long and there might be new commits while building, and from time to time we also start the builds manually, so it is good to have a host ready immediately ... we have long and complicated process, anyway, this is not important).

The problem is that not all the hosts are identical. A few of them have a smaller hard disk and they tend to fill up from time to time, to an extent when a full build willl not complete (the full build generates around 7GB (seven gigabytes) of data) and it would be great to tell bamboo to choose only an agent which has at least 7GB free space.

Is this possible?

Thanks, Ferenc

2 answers

There is no built-in functionality, nor existing plugins, for this at this time that I am aware of. I would suggest for each Job going to the Misc tab and selecting "Clean working directory after each build". THis can clean up disk space but add to build times that may already be too long.

You may also consider using the Script task to run a shell script or bat file that identifies the free disk and possibly fails the build. This wouldn't help you select an agent, but could be step 1 in your build and it would fast-fail the build right away rather than possibly running for hours before failing due to out of disk issue anyway.

We run a daemon process on each agent that continuously checks the disk space (I think it runs "df" every minute). When the used disk space reaches a certain threshhold, it disables the agent, looks for older Bamboo workspaces (and specifically avoids the currently running build), deletes them, and then re-enables the agent. The disable/enable is so that the machine doesn't pick up any new jobs and potentially uses a workspace that was already marked for deletion.

We have not seen any failures due to full disks since we implemented this strategy.

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,561 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