Skip to content

Add cleanup script

Adrien Kohlbecker requested to merge ak/cleanup into master

What does this MR do?

Add script to cleanup images from merged MRs and VMs from finished jobs.

The job runs on a daily schedule. You can see runs here:

Why was this MR needed?

Images are not currently being cleaned up automatically, I do this manually sometimes. But we need to stay under our storage quota. Let's automate this.

VMs are sometimes left behind if jobs fail to clean up their resources. Most obvious example is if you cancel a job in the UI, the VM stays running. If we don't clean that up, at some point the cluster becomes full and CI jobs start to fail because they can't allocate CPU to a new VM. Let's make sure to clean dangling VMs too!

What's the best way to test this MR?

What are the relevant issue numbers?

Closes #3 (closed) #42 (closed)

Edited by Adrien Kohlbecker

Merge request reports