Trigger managed resource deletion when a stop job completes

What does this MR do and why?

Trigger managed resource deletion when a stop job completes

When an environment has a stop job defined, it goes into a stopping state while the job executes. This meant that managed resource deletion was skipped, as it only executed for environments that stop immediately (that is, those with no stop job defined). To support deletions for environments that do have stop jobs, we trigger deletion explicitly when the stop job succeeds.

References

#560798 (closed)

How to set up and validate locally

  1. Register an agent and enable managed resources for a test project
  2. Add a gitlab_ci.yml using the config described in #560798 (closed)
  3. Create a pipeline, and observe that resources are created in the cluster
  4. Stop the environment, and verify that the managed resources are deleted once the stop job completes.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Tiger Watson

Merge request reports

Loading