Add pipeline parameter for disabling the VMR build during PRs (#15328)
This commit is contained in:
parent
779a6442da
commit
e22e2fba2e
1 changed files with 15 additions and 11 deletions
26
.vsts-ci.yml
26
.vsts-ci.yml
|
@ -23,6 +23,11 @@ parameters:
|
|||
type: string
|
||||
default: $(Build.SourceBranchName)
|
||||
|
||||
- name: disableVmrBuild
|
||||
displayName: Skip source-building the VMR
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
variables:
|
||||
- name: _PublishUsingPipelines
|
||||
value: false
|
||||
|
@ -360,7 +365,16 @@ stages:
|
|||
|
||||
- template: /eng/common/templates/jobs/source-build.yml
|
||||
|
||||
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
# 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: ${{ parameters.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: []
|
||||
|
@ -369,16 +383,6 @@ stages:
|
|||
parameters:
|
||||
vmrBranch: ${{ parameters.vmrBranch }}
|
||||
|
||||
# In case the VMR Build stage needs to be temporarily disabled, please make sure that
|
||||
# the VMR synchronization step is run to validate that the PR can be merged and later
|
||||
# synchronized into the VMR without problems.
|
||||
# You can do this by allowing the Synchronize_VMR stage from above in PRs.
|
||||
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
|
||||
- template: eng/pipelines/templates/stages/vmr-build.yml
|
||||
parameters:
|
||||
vmrBranch: ${{ parameters.vmrBranch }}
|
||||
isBuiltFromVmr: false
|
||||
|
||||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- stage: Publish
|
||||
dependsOn:
|
||||
|
|
Loading…
Reference in a new issue