54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
|
trigger: none
|
||
|
pr:
|
||
|
branches:
|
||
|
include:
|
||
|
- main
|
||
|
- release/*
|
||
|
- internal/release/*
|
||
|
|
||
|
parameters:
|
||
|
- name: vmrBranch
|
||
|
displayName: dotnet/dotnet branch to use
|
||
|
type: string
|
||
|
default: ' '
|
||
|
|
||
|
- name: disableVmrBuild
|
||
|
displayName: Skip source-building the VMR
|
||
|
type: boolean
|
||
|
default: false
|
||
|
|
||
|
variables:
|
||
|
- ${{ if ne(parameters.vmrBranch, ' ') }}:
|
||
|
- name: VmrBranch
|
||
|
value: ${{ replace(parameters.vmrBranch, ' ', '') }}
|
||
|
- ${{ else }}:
|
||
|
- name: VmrBranch
|
||
|
value: ${{ replace(replace(variables['System.PullRequest.TargetBranch'], 'refs/heads/', ''), 'refs/pull/', '') }}
|
||
|
|
||
|
resources:
|
||
|
repositories:
|
||
|
- repository: vmr
|
||
|
type: git
|
||
|
name: dotnet-dotnet
|
||
|
ref: $(VmrBranch)
|
||
|
|
||
|
stages:
|
||
|
# You can temporarily disable the VMR Build stage by changing the default of disableVmrBuild
|
||
|
- ${{ if not(parameters.disableVmrBuild) }}:
|
||
|
- template: 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: templates/jobs/vmr-synchronization.yml
|
||
|
parameters:
|
||
|
vmrBranch: ${{ variables.VmrBranch }}
|
||
|
noPush: true
|