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?
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.
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in talking to 20 people planning t...
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!
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