I’d like to be able to clean up distribution folders when the server workspace is cleaned due to policy.
In our case the server hosts distribution folders where users can access the build output. We do a lot of builds all day, so you end up with a lot of stale builds.
My initial plan would be to have a final stage that simply writes the server workspace path to an ini/text file in the distribution output for the build. Then a nightly process would run a program/script/FB/whatever that would search the Distribution folders for appropriately named ini/text files and if the server workspace path no longer exists (presumably due to cleanup) delete the distribution path… So tying our distribution retention to the server cleanup policy, that also allows Pinned builds to stick around.
any other ideas? Maybe there’s a ‘Cleanup Hook’ plan in the works?
Hi,
Thank you for your request. We haven’t any current plans in this area. We will however add an item to our to-do list to investigate this.
Maybe we could provide an input box either as part of the Cleanup Policy or on an extra tab in the Stage Options where you can enter a list of additional paths to cleanup.
Meanwhile, I think that your current plan will work.
I don’t know that paths in the cleanup policy would be sufficient. At least in our case, builds output to configuration and version specific folders that can include branch information, etc. At the end of each build we distribute to an output/distribution folder specific to the build/configuration. If there were an action that could ‘register cleanup paths’, that might work nicely.
Time being I’ll plan on implementing our cleanup idea…