Automatically trace rollback pipelines
Status
As discussed in #2872 (comment 1341433503), we have a deployer MR that's approved, but not yet merged. We'd like to merge it in right before a staging rollback practice to make sure we don't accidentally introduce a breaking MR when we need a non-practice rollback.
Summary
We currently generate and upload traces of coordinated pipelines only.
In addition, we should also trace rollback pipelines.
Proposal
Create/add a job to rollback pipelines that calls the trace:pipeline_url
rake task.
Rollback pipelines run in deployer, but the trace:pipeline_url
rake task is defined in release-tools, so we will need to trigger a downstream pipeline in release-tools from deployer.
- Modify the job in .gitlab/ci/trace.gitlab-ci.yml#L10 to take the service name as a variable. The service name should replace the currently hardcoded
deployment pipelines
. - Add a trigger job to the
gstg
andgprd
deployer rollback pipelines that creates a downstream pipeline in release-tools and passes the appropriate variables (PIPELINE_URL
,TRACE_PIPELINE
,SERVICE_NAME
). Make sure that the job is added only to the rollback pipeline, and not other pipelines.- Example of a job that runs only on the gprd rollback pipeline: ci/environments/gprd.yml#L169-179.
- Example of a job that runs only on the gstg rollback pipeline: ci/environments/gstg.yml#L113-124
Links
Rake task that traces pipelines: trace.rake#L5
Job in coordinator pipeline that triggers the above rake task: .gitlab/ci/coordinated-pipeline.gitlab-ci.yml#L711
Exit Criteria
-
Modify .gitlab/ci/trace.gitlab-ci.yml#L10 to take the service name as a variable: gitlab-org/release-tools!2226 (merged) -
Add a trigger job to the gstg
andgprd
deployer rollback pipelines that creates a downstream pipeline in release-tools and passes the appropriate variables