nested if
This commit is contained in:
parent
7e0cda824a
commit
7c8817837a
1 changed files with 16 additions and 14 deletions
30
.vsts-ci.yml
30
.vsts-ci.yml
|
@ -372,23 +372,25 @@ stages:
|
|||
|
||||
- template: /eng/common/templates/jobs/source-build.yml
|
||||
|
||||
# You can temporarily disable the VMR Build stage by setting the disableVmrBuild variable on the installer pipeline
|
||||
- ${{ if and(eq(variables['Build.Reason'], 'PullRequest'), not(parameters.disableVmrBuild)) }}:
|
||||
- template: eng/pipelines/templates/stages/vmr-build.yml
|
||||
parameters:
|
||||
vmrBranch: ${{ variables.VmrBranch }}
|
||||
isBuiltFromVmr: false
|
||||
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
|
||||
|
||||
# In case the VMR Build stage is temporarily disabled, the VMR synchronization step is run to validate
|
||||
# that the PR can be merged and later synchronized into the VMR without problems.
|
||||
- ${{ if and(eq(variables['Build.Reason'], 'PullRequest'), parameters.disableVmrBuild) }}:
|
||||
- stage: Synchronize_VMR
|
||||
displayName: Synchronize VMR
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: eng/pipelines/templates/jobs/vmr-synchronization.yml
|
||||
# You can temporarily disable the VMR Build stage by setting the disableVmrBuild variable on the installer pipeline
|
||||
- ${{ if not(parameters.disableVmrBuild) }}:
|
||||
- template: eng/pipelines/templates/stages/vmr-build.yml
|
||||
parameters:
|
||||
vmrBranch: ${{ variables.VmrBranch }}
|
||||
isBuiltFromVmr: false
|
||||
|
||||
# In case the VMR Build stage is temporarily disabled, the VMR synchronization step is run to validate
|
||||
# that the PR can be merged and later synchronized into the VMR without problems.
|
||||
- ${{ else }}:
|
||||
- stage: Synchronize_VMR
|
||||
displayName: Synchronize VMR
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: eng/pipelines/templates/jobs/vmr-synchronization.yml
|
||||
parameters:
|
||||
vmrBranch: ${{ variables.VmrBranch }}
|
||||
|
||||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- stage: Publish
|
||||
|
|
Loading…
Reference in a new issue