How to set the max artifact size in Bamboo

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

When transferring artifacts, it is useful to be able to limit their size due to network limitations or run tests in Bamboo. By default, Bamboo doesn't set a limit on the size of build artifacts. However, you can set one if you want to.

Environment

The solution has been validated in Bamboo Data Center 9.2 but may be applicable to other versions.

Solution

By default, Bamboo doesn't set a limit on the size of build artifacts. However, you can set it in case you want to.

Limit the sizes of artifact(s) produced by your plans:

  1. Stop Bamboo.

  2. Add the -Dbamboo.artifact.size.limit.per.build property to the JVM by following the instructions inside the Configuring your system properties. This property has to be set in bytes. For example, if you want to limit the size of any single artifact file to 200 MB you will need to use 209715200:

    1 -Dbamboo.artifact.size.limit.per.build=209715200
  3. Start Bamboo.

After that, a warning message will start showing up inside the artifact definition page of every plan in Bamboo with the following message:

Warning

Artifacts size limit enabled

Total size of artifacts produced for single build result may not exceed 200 MB. Artifacts will not be uploaded to the Bamboo server if the size limit is exceeded.

Builds will not fail due to this limitation but deployment projects and other jobs that require such artifacts to run will fail if they can't download the artifact from the server. Users will see an error on the build result summary page with the following message when an artifact exceeds the size limit:

Unable to publish artifacts. Total artifact size for build [360 MB] exceeded limit [200 MB]. Artifacts were not copied to the server.

(07 Dec 2024, 1:24:26 PM, Agents: <agentName>)

Updated on March 5, 2025

Still need help?

The Atlassian Community is here for you.