Add rake task to clean up review apps
Sometimes review app environments left as active even though an associated merge request is merged or closed. This situation happens when:
on_stopjob is not defined in a pipeline
on_stopjob was triggered but failed
- User didn't remove the source branch of the merge request, so that
on_stopwas not triggered (This happens ~%11.10)
on_stopjob is not triggered because of a bug
We should have a way to clean up these environments.
Add rake task to trigger
on_stop jobs, which fall under the following conditions:
- The associated merge request is merged or closed
- The review app's environment is still active.
Here is the administration command (rake task).
Or, we can consider adding a button at the project level.