Skip to content

Stage 3: Move post deploy migrations from being inside the deploy invocation of deployer to its own invocation of deployer

Currently post deploy migrations run inside deployer as part of the pipeline that deploys the code to an environment (non-canary stages).

In order to make it possible to move post-deploy migrations around, we want to keep post-deploy migrations inside the deployer pipeline, but split it from the deploy pipeline.

This means

  1. The pipeline invoked without POSTDEPLOY_MIGRATIONS set at all keeps the current state of things, so that chatops still works
  2. With POSTDEPLOY_MIGRATIONS set to false, the deployer pipeline will run but not do the post deploy migrations task
  3. We need to make sure we can call a deployer pipeline with RUN_POST_DEPLOY_MIGRATIONS set to true and the ONLY task that is run out of the entire pipeline is the post-migrations for the pipeline in question
  4. We need to then change the coordinated pipeline to call deployer twice, once with RUN_POST_DEPLOY_MIGRATIONS as false then RUN_POST_DEPLOY_MIGRATIONS as true in the appropriate locations

Testing

General

Post-migrations on staging

Post-migrations on gprd

Post-migration failure

  • gstg
Failure notification Slack Success notification after retry
Screen_Shot_2022-01-12_at_16.43.40 Screen_Shot_2022-01-12_at_17.14.17
Link Link
  • gprd
Failure notification Slack Success notification after retry
Screen_Shot_2022-01-12_at_18.43.31 Screen_Shot_2022-01-12_at_18.43.53
Link Link

Clean up

  • Unprotect branch in ops
  • Remove branch from ops

What to do if something goes wrong?

Status 12-01-2021

All the testing scenarios have been successfully tested. gitlab-org/release-tools!1630 (merged) has been merged. This issue is completed.

Edited by Mayra Cabrera