Delete stopped environments
Issue
what's up with all the environments shown on this page? https://gitlab.com/gitlab-org/gitlab-docs/-/environments/folders/review
As of June 2, 2022, if you show all, there are 161 active, and 1647 stopped. Would it help anything to delete the stopped ones?
I just searched and found this big discussion, which resulted in this script that maybe we can use?
Proposal
Add a job to the chores pipeline to delete stopped environments that are more than 30 days old. Authenticate with the CI_JOB_TOKEN (which will use the permissions of the TW that triggered the pipeline) to make an API call to the stopped environments cleanup endpoint.
Edited by Marcel Amirault