I have three deployments environment Test, Staging and Production. Each one has some environment variables that the another also has (e.g. DEPLOY_URL). DEPLOY_URL has a different value per deployments environment.
Actually, we can't have the deployment keyword duplicate in the pipeline definition. I wanna know how can I achieve this in another way. This is because I have a step that deploy the application (Step One) and another that trigger a service based on the current deployment (Step Two).
For example:
definitions:
steps:
- step: &stepOne
name: Run Step One
script:
- ... commands
- step: &stepTwo
name: Run Step One
script:
- ... commands
pipelines:
branches:
master:
- step:
<<: *stepOne
deployment: Production
- step:
<<: *stepTwo
deployment: Production
develop:
- step:
<<: *stepOne
deployment: Staging
- step:
<<: *stepTwo
deployment: Staging