Skip to content

Add API to Stop Stale Environments

Allen Cook requested to merge 19724-api-stop-stale-environments into master

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

  1. POST to the /api/v4/projects/<PROJECT_ID/environments/stop_stale?before=<DATE> endpoint with an appropriate date
  2. 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.

Related to #19724 (closed)

Edited by Allen Cook

Merge request reports