Suggestion for optimising Artifacts size/storage

Platform Notice: Data Center Only - This article only applies to Atlassian products 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

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.

Solution

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 HandlerscheckEnable package threshold andAdd 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

      1 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.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.