How do I know what Bamboo plan is storing artifacts in which directory on disk?

Still need help?

The Atlassian Community is here for you.

Ask the community

Purpose

Since Bamboo 5.12, the way artifacts are stored on-disk has changed to a format which no longer displays an obvious relationship to the plan name from which the artifacts were generated. The new format: <bamboo-home>/artifacts/plan-123456. 

This can be problematic when trying to analyze which builds are using the most disk space. For example, we've run the below command on a Linux host to find out which directories in the artifact folder are using the most disk space but from the output, we don't know what plan the artifact storage belongs to:

$ du -h /var/bamboo-home/artifacts/ --max-depth 1 | sort -rh
126M	/var/bamboo-home/artifacts/plan-18022401
136K	/var/bamboo-home/artifacts/plan-20414467
4.0K	/var/bamboo-home/artifacts/tmp

Solution

The Bamboo database can be easily queried to retrieve a list of plan key to storage tag mappings:

SELECT FULL_KEY,STORAGE_TAG FROM BUILD WHERE BUILD_TYPE IN ('CHAIN','CHAIN_BRANCH');

Example result:

full_keystorage_tag
SAMPLE-PLANplan-18022401
PROJ-PLANplan-20414467

We can also perform a reverse look-up using the REST API when you are looking to find what the storage tag is for a certain plan key:

Last modified on May 4, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.