Skip to content

cleanup-test-artifacts: Avoid accidentally deleting empty folders

Emanuele Aina requested to merge wip/em/cleanup-test-artifacts into apertis/v2021dev3

The current script deletes empty folders too aggressively: in particular OSTree repositories get created with an empty refs/remotes directory and the current script always prunes it, causing OSTree to complain when trying to push new commits and causing the test pipelines to fail.

It may also play badly with OSTree repositories, deleting old files which may be needed.

To avoid that, rework it so that for each branch folder it cleans up daily builds in the ./daily directory and then it drops everything only if no remaining file has been modified in the past 24 hours.

Merge request reports