Release Environment - Refactor the pipeline so each environment's deployment has its own pipeline
The current pipeline of Release Environment can be described roughly like this:
Some preparations happen -> create-dynamic-pipeline
based on ci/deploy.jsonnet
-> trigger-deploy
creates a downstream pipeline.
In this workflow, the actual deployment to the environment(s) and related jobs happen in the downstream pipeline (example). If you look at the generated dynamic pipeline (example), you see that one downstream pipeline takes care all the 3 release environments that we maintain. It brings a drawback when it comes to the isolation between environments, in situations like:
- Slack notification about the deployment to an environment - the pipeline's status doesn't reflect the result of the deployment
- Tracking a deployment to an environment - a failure in an environment can block the action on other environments
Thus, we should refactor the release environment's pipeline, so one pipeline only deploys to one environment.
Edited by Dat Tang