Commit 3c729600 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'dont-stop-already-stopped-environments' into 'master'

Don't try to stop already stopped environments

See merge request gitlab-org/gitlab!26678
parents 72fa231a 996812e7
......@@ -81,7 +81,7 @@ class AutomatedCleanup
release = Quality::HelmClient::Release.new(environment.slug, 1, deployed_at.to_s, nil, nil, review_apps_namespace)
releases_to_delete << release
end
elsif deployed_at < stop_threshold
elsif environment.state != 'stopped' && deployed_at < stop_threshold
stop_environment(environment, deployment)
else
print_release_state(subject: 'Review App', release_name: environment.slug, release_date: last_deploy, action: 'leaving')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment