Track the execution of the last post-deploy pipeline migration
With the independent post-deploy pipeline, built as part of &585 (closed), the logic for rolling back a package will change: Release Managers need to know a point in time at which they can rollback.
Proposal
Track the package deployed at gstg/gprd at the moment the post-migration pipeline is executed by:
- Adding two environments:
db/gstg
anddb/gprd
on GitLab canonical and Security - When the post-deploy pipeline is executed, track the package that is running on gstg and gprd.
Doing this has the following benefits:
- The execution of the post-migrations is tracked per environment. This could help developers to know if a post-migration has been executed on gstg and gprd (as the information should be available on a merge request widget)
- It establishes a point in time of no return. Meaning rollbacks are available to any package after the package that was recorded.
Implementation details
-
Add two environments to the GitLab Canonical and Security projects: db/gstg
anddb/gprd
- Canonical
- Security
-
Create a class to track a running
,success
, orfailed
deployment on the post-deploy environments gitlab-org/release-tools!1864 (merged) -
Adjust the tracking of the post-deploy pipeline gitlab-org/release-tools!1868 (merged) - The tracking should only happen when there are pending post-migrations
-
Running
state should be tracked before the execution of the post-migrations
-
Track both environments: Canonical and Security gitlab-org/release-tools!1868 (merged) - We track in the Security repository by default
- If the commit is on Canonical we track on Canonical as well.
- Record metadata deployment
-
Add ci jobs to the post-deploy pipeline to track the post-migration execution gitlab-org/release-tools!1879 (merged) - Three jobs should be added to record a canonical/security deployment and a product deployment based on the status (
running
,success
,canceled
)
- Three jobs should be added to record a canonical/security deployment and a product deployment based on the status (
-
Labeler gitlab-org/release-tools!1884 (merged) -
Add workflow::post-deploy-db-staging
andworkflow::post-deploy-db-production
labels-
workflow::post-deploy-db-staging
- https://gitlab.com/groups/gitlab-org/-/labels/25579355/edit -
workflow::post-deploy-db-production
- https://gitlab.com/groups/gitlab-org/-/labels/25579465/edit
-
Edited by Mayra Cabrera