I am trying to get the new stage variables to work.Here is my stripped down example:-
stages:
- stage: firstStage
jobs:
- job: varSetJob
pool:
vmImage: 'windows-latest'
steps:
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
Write-Output ("##vso[task.setvariable variable=DeployEnvironment;isOutput=true]AnEnvironment")
Write-Output ("vso[task.setvariable variable=DeployEnvironment;isOutput=true]AnEnvironment")
name: varStep
- script: echo $(varStep.deployEnvironment)
name: show
- stage: secondStage
dependsOn: firstStage
variables:
- name: DeployEnvironmentstage
value: $[ stageDependencies.firstStage.varSetJob.outputs['varStep.DeployEnvironment'] ]
jobs:
- job: showvar
pool:
vmImage: 'windows-latest'
steps:
- script: echo $(DeployEnvironmentstage)
name: show
This pipeline fails to start the second step and no logs are made, running in diagnostic mode.
I've checked the azure devops version and it is on the latest sprint version.
Has anyone had this working yet?