I built a pipeline. There are two stages. The deployment stage job has a condition derived from the first stage variable. The sample pipeline is provided below.
- stage: Stage
- deployment: Staging
displayName: Stage the WebApp
- bash: echo "##vso[task.setvariable variable=myStageOutputVar;isOutput=true]true"
myVar: 'this is a stage output var'
- stage: Swap
condition: eq(dependencies.Stage.Staging.outputs['Staging.printvar.myStageOutputVar'], 'true')
myVarfromStage: $[ stageDependencies.Stage.Staging.outputs['Staging.printvar.myStageOutputVar'] ]
- deployment: Production
displayName: Swap to production
- script: echo $(myVarfromStage)
Every time, the Swap - stage is skipped. Any changes that must be made in the condition?