Breakout post deploy migrations into their own pipeline invocation
What does this MR do?
Part of gitlab-com/gl-infra/delivery#2107 (closed)
This change leverages a CI variable $POSTDEPLOY_MIGRATIONS
which
acts as a "switch" for the entire pipeline. This was added in
https://ops.gitlab.net/gitlab-com/gl-infra/deployer/-/merge_requests/434
When this variable is set to anything, the only job in the pipeline will be the postdeploy-migrations job for that specific environment.
When the variable is unset, the pipelines should act identical to how they were before, except the post-deploy migrations job for an environment won't be present.
This changes release tool to keep the variable undefined for the deploy pipeline so it will work as usual (minus post-deploy migrations), and then invokes the pipeline again with the variable set, in order to just perform post-deploy migrations.
This should have the same effect overall, but it does allow us to move where post-deploy migrations happen in the overall co-ordinated pipeline.
Author Check-list
- [-] Has documentation been updated?