It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bamboo plan build agent agent choice based on agent disk free


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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published Thursday in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

116 views 0 10
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