How do I know what Bamboo plan is storing artifacts in which directory on disk?
Platform Notice: Data Center Only - This article only applies to Atlassian apps on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
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_key | storage_tag |
---|---|
SAMPLE-PLAN | plan-18022401 |
PROJ-PLAN | plan-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:
Was this helpful?