Cleanup workflows and artifacts on expiration
Depends https://gitlab.com/arkindex/ponos/-/issues/116
When a workflow becomes expired, we can safely delete:
- all its tasks in DB
- all its tasks logs on bucket
- all its tasks artifacts in DB
- all its tasks artifacts on bucket
- the workflow
-
🗨 We need to discuss if the deletion of DataImport is needed (we could retry old dataimports...)
- if any task artifact in the workflow is used as a worker version docker image with GitRef
branch=master
- if any task artifact in the workflow is used as a worker version docker image with GitRef on any tags
Basically we can remove all docker images on outdated branches, but need to keep current master
and tags