Azure pipelines Stage 变量失败且没有错误
Azure pipelines Stage variable fails with no error
我正在尝试将新的阶段变量设置为 work.Here 是我的精简示例:-
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 版本。
有人用过这个吗?
尝试将变量放在作业下:
- stage: secondStage
dependsOn: firstStage
jobs:
- job: showvar
pool:
vmImage: 'windows-latest'
variables:
- name: DeployEnvironmentstage
value: $[ stageDependencies.firstStage.varSetJob.outputs['varStep.DeployEnvironment'] ]
steps:
- script: echo $(DeployEnvironmentstage)
name: show
我正在尝试将新的阶段变量设置为 work.Here 是我的精简示例:-
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 版本。
有人用过这个吗?
尝试将变量放在作业下:
- stage: secondStage
dependsOn: firstStage
jobs:
- job: showvar
pool:
vmImage: 'windows-latest'
variables:
- name: DeployEnvironmentstage
value: $[ stageDependencies.firstStage.varSetJob.outputs['varStep.DeployEnvironment'] ]
steps:
- script: echo $(DeployEnvironmentstage)
name: show