Add API to Stop Stale Environments
What does this MR do and why?
Adds an API to stop stale environments using Environments::StopStaleService
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
- POST to the
/api/v4/projects/<PROJECT_ID/environments/stop_stale?before=<DATE>
endpoint with an appropriate date - Output should look like
{
"message": "Successfully scheduled stale environments to stop"
}
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #19724 (closed)
Edited by Allen Cook