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
|
- template: /eng/common/templates/variables/pool-providers.yml
|
||||||
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
|
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
|
||||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
- 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
|
- group: DotNetBot-GitHub
|
||||||
- ${{ else }}:
|
- ${{ else }}:
|
||||||
- name: BotAccount-dotnet-bot-repo-PAT
|
- name: BotAccount-dotnet-bot-repo-PAT
|
||||||
|
|
|
@ -25,15 +25,16 @@ jobs:
|
||||||
- template: /eng/common/templates/variables/pool-providers.yml
|
- template: /eng/common/templates/variables/pool-providers.yml
|
||||||
- name: vmrPath
|
- name: vmrPath
|
||||||
value: $(Agent.BuildDirectory)/vmr
|
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'))) }}:
|
- ${{ if not(parameters.noPush) }}:
|
||||||
- group: DotNetBot-GitHub
|
- ${{ 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-No-Scopes
|
- group: DotNetBot-GitHub
|
||||||
- name: vmrPublicUrl
|
- group: DotNetBot-GitHub-No-Scopes
|
||||||
value: https://github.com/dotnet/dotnet
|
- name: vmrPublicUrl
|
||||||
- ${{ if and( eq(variables['System.TeamProject'], 'internal'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/')) }}:
|
value: https://github.com/dotnet/dotnet
|
||||||
- group: DotNetBot-AzDO-PAT
|
- ${{ if and( eq(variables['System.TeamProject'], 'internal'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/')) }}:
|
||||||
- name: vmrInternalUrl
|
- group: DotNetBot-AzDO-PAT
|
||||||
value: https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-dotnet
|
- name: vmrInternalUrl
|
||||||
|
value: https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-dotnet
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
${{ if eq(variables['System.TeamProject'], 'public') }}:
|
${{ 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
|
- template: templates/jobs/vmr-synchronization.yml
|
||||||
parameters:
|
parameters:
|
||||||
vmrBranch: ${{ variables.VmrBranch }}
|
vmrBranch: ${{ variables.VmrBranch }}
|
||||||
|
noPush: true
|
||||||
|
|
Loading…
Add table
Reference in a new issue