[CI] Ensure review app cleanup runs when expected
Summary
Fixes jobs triggering before they were needed
Prevents the cleanup jobs from triggering immediately as long
as the pipeline is succeeding - instead, they will only
trigger when their rules match.
This was related to the needs: [] workaround.
Automatically clean up review apps in 1 hour
Automatically cleans up review apps in 1 hour instead of 4 days. Added documentation on how to pin the environment if further investigation is needed.
This will ensure that our clusters have enough breathing room to run review apps for merge requests and help us avoid stale releases.
Closes #334 (closed)
Testing
- In https://gitlab.com/gitlab-org/cloud-native/gitlab-operator/-/pipelines/374808838, the
cleanupjobs didn't trigger directly after theReviewstage passed - In https://gitlab.com/gitlab-org/cloud-native/gitlab-operator/-/pipelines/374808838, the environments auto-uninstalled after 1 hour
Edited by Mitchell Nielsen