We are using the downloads folder to deploy our artefacts and we recently started having serious issues with this page not showing any files anymore. We can access the folder through the API, which we use to download files via our Jenkins CI.
We have an agreed retention policy of our build artefacts and to enable this, we want to be able to remove artefacts that are older than a certain value. I could not find a way to do this via API or any other way so far.
I would love to get some insights from the community on this one.
By downloads folder, I assume that you are referring to the Downloads section of a repo?
There is an API endpoint for deleting a certain file from the Downloads section of a repo, but I believe it is not possible to filter by date (so, delete a file older than a certain date).
This could perhaps be done if you write a script that gets all files from the Downloads section via an API call, then manipulate the JSON string in the output and filter by the created_on date, so that you get files older than a certain date, and then delete those files via an API call.
Regarding the Downloads page not loading for you, there is a possibility the page may not be loading due to a time out error. How many files do you have uploaded approximately? I've seen similar issues reported by users who've had a few thousands of files uploaded in that section, and the page was not loading because the request was timing out.
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events