openwisp/openwrt-openwisp-monitoring

[ci] Delete old builds

nemesifier opened this issue · 6 comments

@devkapilbansal is there a way to remove the old builds?
I think we can keep stable releases (which we shall name differently), but we should highly limit the build results because space has a cost, I think we can keep the last 5 builds.

I am not sure but there should be some way. I will try to find more about it

This might be helpful: https://cloud.google.com/storage/docs/object-versioning

I think it can be great if we don't want to show builds to users. I mean is it possible to show all versions of the object to the user without some workaround?

What I am thinking of is to use some cloud functions to manage this thing. 🤔

I'll read more on this and get back after the weekend. Please feel free to proceed if you are able to make it work.

Hi @nemesisdesign
We can do it using Cloud Functions. A custom script can be executed that will be triggered on a file upload.
We can either keep stable releases in a different path like {bucket-name}/release or name them differently, whatever sounds good

I would not change paths for now but only concern with deleting very old builds (eg: > 2 years).