Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I set the expiration time for artifacts in Bitbucket Downloads?

Mikołaj Waśniewski October 6, 2023

I want to automatically delete artifacts in Bitbucket Downloads after 7 days. How can I do that?

2 answers

2 votes
Aron Gombas _Midori_
Community Champion
October 9, 2023

@Mikołaj Waśniewski We had the same use case, and we built the following solution:

  1. Create a new Pipeline 
  2. The Pipeline can get the list of the artifacts using the Bitbucket Cloud REST API
  3. It can test if an artifact is "too old", and delete that using another REST API end-point

It is really just a few line of code. Then, you just have to run this pipeline periodically and you're done.

(In our case, it is just one step in a complete pipeline which is executed at each commit, but the core is roughly the same as yours. And it has been working reliably for us for a few years.)

2 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 8, 2023

G'day, @Mikołaj Waśniewski 

Artifacts expiry is not configurable for the default 14 days in the Bitbucket cloud. We do have a feature request on this at:

Ability to set expiration period for artifacts 

Please Vote and Watch the feature request to make sure you won't miss any updates in the future if the feature is accepted.

Regards,
Syahrul

Mikołaj Waśniewski October 9, 2023

Hello @Syahrul 

Does this 14 days expiration period apply also to artifacts in Bitbucket Downloads? (which can be i.e. uploaded manually)

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 9, 2023

Hey @Mikołaj Waśniewski 

Artifacts do not expire if you upload them on the Downloads tabs.

Regards,
Syahrul

Mikołaj Waśniewski October 10, 2023

Thanks @Syahrul ,

So is there any size limit for artifacts stored in Download tab?

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 10, 2023

Hey @Mikołaj Waśniewski 

The artifact limit is 1 GB, and the upload limit for the Download tab section is 2 GB.

You can only generate artifacts up to 1 GB in size to upload to the Downloads section. So technically you can upload only 1 GB artifacts to Downloads.

Regards,
Syahrul

yosser_mahfoudh May 14, 2024

Hi @Syahrul , Is there a way to upgrade the artifact limit from 1GB to 5GB?

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 14, 2024

Hey @yosser_mahfoudh 

Unfortunately, that is the current hard limit. If you require bigger storage for artifacts, we recommend that you use your own storage solution, such as Amazon S3, or a hosted artifact repository like JFrog Artifactory.

Regards,
Syahrul

yosser_mahfoudh May 15, 2024

how to implement that in my pipeline. Because what I have now is storing my executable in the artifacts then copy its content to S3.

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 15, 2024

Hey @yosser_mahfoudh 

Please check our guide below on how to publish and link your artifacts to AWS or S3:

Publish and link your build artifacts 

Regards,
Syahrul

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events