Pipeline housekeeping for tpo/core/debian/tor project
As a follow-up for #41402 (comment 2970105) I would like to propose that daily-scheduled CI pipelines that build supported branches in tpo/core/debian/tor
be automatically deleted after 2 weeks.
There are currently three such schedules, and they each run daily, adding some ~50MB of logs. When CI artifacts cleanup is broken, they also each add ~250MB of artifacts.
Implementing this automatic deletion would:
- Significantly reduce the storage requirements for job logs (currently 13.80GB of job logs for these pipelines specifically)
- Help limit the impact of any GitLab regresssion causing CI build artifacts to accumulate
Artifacts and build logs for CI pipelines that run on tagged commits would not be affected, and still be kept indefinitely.
This can be implemented very easily using either a cron job or service/timer pair, to run the following shell command:
gitlab-rails runner "Ci::Pipeline.where(project_id: 1218, source: 'schedule', locked: 'unlocked').where('finished_at < ?', 2.weeks.ago).delete
Unless further discussion is needed, I will implement this on Monday, December 11.