我正在尝试使新的阶段变量起作用。这是我的精简示例:-
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
此管道无法启动第二步,并且没有生成日志,在诊断模式下运行。
我检查了 azure devops 版本,它是最新的 sprint 版本。
有人有这个工作吗?