Add VMR build for internal installer PRs (#15644)
This commit is contained in:
parent
c294a932ff
commit
94e129d646
4 changed files with 65 additions and 10 deletions
|
@ -71,7 +71,7 @@ jobs:
|
|||
- template: /eng/common/templates/variables/pool-providers.yml
|
||||
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
|
||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
||||
- ${{ if and(not(parameters.isBuiltFromVmr), eq(variables['System.TeamProject'], 'internal')) }}:
|
||||
- ${{ if and(not(parameters.isBuiltFromVmr), eq(variables['System.TeamProject'], 'internal'), not(startswith(parameters.vmrBranch, 'internal/release/'))) }}:
|
||||
- group: DotNetBot-GitHub
|
||||
- ${{ else }}:
|
||||
- name: BotAccount-dotnet-bot-repo-PAT
|
||||
|
|
|
@ -25,15 +25,16 @@ jobs:
|
|||
- template: /eng/common/templates/variables/pool-providers.yml
|
||||
- name: vmrPath
|
||||
value: $(Agent.BuildDirectory)/vmr
|
||||
- ${{ if and( eq(variables['System.TeamProject'], 'internal'), or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}:
|
||||
- group: DotNetBot-GitHub
|
||||
- group: DotNetBot-GitHub-No-Scopes
|
||||
- name: vmrPublicUrl
|
||||
value: https://github.com/dotnet/dotnet
|
||||
- ${{ if and( eq(variables['System.TeamProject'], 'internal'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/')) }}:
|
||||
- group: DotNetBot-AzDO-PAT
|
||||
- name: vmrInternalUrl
|
||||
value: https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-dotnet
|
||||
- ${{ if not(parameters.noPush) }}:
|
||||
- ${{ if and( eq(variables['System.TeamProject'], 'internal'), or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}:
|
||||
- group: DotNetBot-GitHub
|
||||
- group: DotNetBot-GitHub-No-Scopes
|
||||
- name: vmrPublicUrl
|
||||
value: https://github.com/dotnet/dotnet
|
||||
- ${{ if and( eq(variables['System.TeamProject'], 'internal'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/')) }}:
|
||||
- group: DotNetBot-AzDO-PAT
|
||||
- name: vmrInternalUrl
|
||||
value: https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-dotnet
|
||||
|
||||
pool:
|
||||
${{ if eq(variables['System.TeamProject'], 'public') }}:
|
||||
|
|
53
eng/pipelines/vmr-build-internal.yml
Normal file
53
eng/pipelines/vmr-build-internal.yml
Normal file
|
@ -0,0 +1,53 @@
|
|||
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
|
|
@ -50,3 +50,4 @@ stages:
|
|||
- template: templates/jobs/vmr-synchronization.yml
|
||||
parameters:
|
||||
vmrBranch: ${{ variables.VmrBranch }}
|
||||
noPush: true
|
||||
|
|
Loading…
Add table
Reference in a new issue