nested if

This commit is contained in:
MilenaHristova 2023-02-01 15:36:42 +01:00
parent 7e0cda824a
commit 7c8817837a

View file

@ -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