Split the VMR Build into a separate pipeline (#15419)

This commit is contained in:
Přemek Vysoký 2023-02-07 03:29:39 +01:00 committed by GitHub
parent cb2a7a4f80
commit 48873c2344
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 52 additions and 45 deletions

View file

@ -10,24 +10,6 @@ trigger:
- internal/release/6.*
- internal/release/7.*
resources:
repositories:
- repository: vmr
type: github
name: dotnet/dotnet
endpoint: dotnet
parameters:
- name: vmrBranch
displayName: dotnet/dotnet branch to push to
type: string
default: ''
- name: disableVmrBuild
displayName: Skip source-building the VMR
type: boolean
default: false
variables:
- name: _PublishUsingPipelines
value: false
@ -48,13 +30,6 @@ variables:
- name: _InternalRuntimeDownloadArgs
value: ''
- ${{ if ne(parameters.vmrBranch, '') }}:
- name: VmrBranch
value: ${{ parameters.vmrBranch }}
- ${{ else }}:
- name: VmrBranch
value: ${{ replace(replace(variables['Build.SourceBranch'], 'refs/heads/', ''), 'refs/pull/', '') }}
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- group: DotNetBuilds storage account read tokens
- name: _InternalRuntimeDownloadArgs
@ -372,26 +347,6 @@ stages:
- template: /eng/common/templates/jobs/source-build.yml
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
# 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
dependsOn:

View file

@ -0,0 +1,52 @@
trigger: none
pr:
branches:
include:
- main
- release/*
parameters:
- name: vmrBranch
displayName: dotnet/dotnet branch to push to
type: string
default: ''
- name: disableVmrBuild
displayName: Skip source-building the VMR
type: boolean
default: false
variables:
- ${{ if ne(parameters.vmrBranch, '') }}:
- name: VmrBranch
value: ${{ parameters.vmrBranch }}
- ${{ else }}:
- name: VmrBranch
value: ${{ replace(replace(variables['System.PullRequest.TargetBranch'], 'refs/heads/', ''), 'refs/pull/', '') }}
resources:
repositories:
- repository: vmr
type: github
name: dotnet/dotnet
endpoint: dotnet
ref: ${{ variables.VmrBranch }}
stages:
# You can temporarily disable the VMR Build stage by setting the disableVmrBuild variable
- ${{ 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 }}