Suggestion for optimising Artifacts size/storage

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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

Large Artifacts stored without compression will potentially lead to excess storage capacity usage. A job can be customised to ensure the Artifacts produced by Bamboo are compressed into a single or multiple files.

Environment

Bamboo Datacenter

Suggestion

  1. Enable package threshold for the type of Artifact storage. With this option, when the number of files that match the Artifact exceeds the threshold, Bamboo packs the Artifact into a single file. (Bamboo uses zip compression, and you can implement Artifact compression before publishing Artifact with solution C below.)
    1. For Bamboo server Artifact handler, navigate to Artifact Handlerscheck  Enable package threshold and Add a value for the required threshold → Save

    2. For Amazon S3, navigate to Artifact HandlersAdd a value for the required threshold → Save
    3. Add a script task as the last task for the Job which produces the Artifact. The script's responsibility is to compress the expected Artifact into a single compressed file, e.g;

      Compress
      tar cvf archive.tar.gz --use-compress-program='gzip -9' *.txt
      1. Modify the Artifacts definition to produce the compressed file, e.g **/*.gz 

        • To use the Artifact, a Script task can be added to the Deployment Task or child plans after the Artifacts download task, this will ensure the Artifacts are uncompressed before usage.



Last modified on Jan 16, 2024

Was this helpful?

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