Skip to content
Snippets Groups Projects
Commit 6f1e3b83 authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Merge branch '34697-skip-nil-env' into 'master'

Clarify we skip nil environment when cleaning up

See merge request !18989
parents 58a1f0f9 ada8e186
No related branches found
No related tags found
1 merge request!18989Clarify we skip nil environment when cleaning up
Pipeline #90797687 failed
......@@ -62,7 +62,8 @@ def perform_gitlab_environment_cleanup!(days_for_stop:, days_for_delete:)
gitlab.deployments(project_path, per_page: DEPLOYMENTS_PER_PAGE).auto_paginate do |deployment|
environment = deployment.environment
next unless !environment.nil? && environment.name.start_with?('review/')
next unless environment
next unless environment.name.start_with?('review/')
next if checked_environments.include?(environment.slug)
last_deploy = deployment.created_at
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment