Split the VMR Build into a separate pipeline (#15419)
This commit is contained in:
parent
cb2a7a4f80
commit
48873c2344
2 changed files with 52 additions and 45 deletions
45
.vsts-ci.yml
45
.vsts-ci.yml
|
@ -10,24 +10,6 @@ trigger:
|
||||||
- internal/release/6.*
|
- internal/release/6.*
|
||||||
- internal/release/7.*
|
- 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:
|
variables:
|
||||||
- name: _PublishUsingPipelines
|
- name: _PublishUsingPipelines
|
||||||
value: false
|
value: false
|
||||||
|
@ -48,13 +30,6 @@ variables:
|
||||||
- name: _InternalRuntimeDownloadArgs
|
- name: _InternalRuntimeDownloadArgs
|
||||||
value: ''
|
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') }}:
|
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
|
||||||
- group: DotNetBuilds storage account read tokens
|
- group: DotNetBuilds storage account read tokens
|
||||||
- name: _InternalRuntimeDownloadArgs
|
- name: _InternalRuntimeDownloadArgs
|
||||||
|
@ -372,26 +347,6 @@ stages:
|
||||||
|
|
||||||
- template: /eng/common/templates/jobs/source-build.yml
|
- 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')) }}:
|
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||||
- stage: Publish
|
- stage: Publish
|
||||||
dependsOn:
|
dependsOn:
|
||||||
|
|
52
eng/pipelines/vmr-build.yml
Normal file
52
eng/pipelines/vmr-build.yml
Normal 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 }}
|
Loading…
Add table
Add a link
Reference in a new issue