Automate Pre environment check before monthly release
From the discussion in #19697 (closed), @rpereira2 suggested the following idea to automate the deployment to Pre ahead of monthly release to check if the env is functional:
Idea
- We can have a scheduled pipeline that runs once a day and checks how far we are from the release day.
- If we are less than 2 weeks away from release day, pull the latest auto deploy version on gprd, and start a deployment to pre using that version.
- Latest version on gprd can be pulled from https://ops.gitlab.net/gitlab-org/release/metadata.
- Post a message to Slack that a deployment has been started.
Possible problems
-
pre
is sometimes used by SREs to as an environment to experiment on. If the environment is not locked during this experimentation, a pre deployment might start in the middle of it.
From the idea above, we can implement a solution
Exit Criteria
-
A deployment to pre
is done monthly, roughly 1 week before the monthly release-
A schedule is set on the 2nd Friday, at 8:30 am UTC. (cron: 27 8 * * thu#2
)
-
-
The deployment to pre
deploys the current version on.com
-
A comment is added to the release issue once the deployment to pre
succeeds (or fails) -
The pre
env is locked during the deployment to not interfere with other activities -
The spec on the monthly template is updated to check pipeline -
A follow up issue is opened to drop the feature flag(the MR is merged without adding the feature flag)
Edited by Dat Tang