2024-02-06 08:57:00 +00:00
|
|
|
# This yml is used by these pipelines and triggers:
|
|
|
|
#
|
|
|
|
# - installer-source-build (public)
|
|
|
|
# - PR: release/* and main, ultralite build
|
|
|
|
# - installer-unified-build (public)
|
2024-02-07 16:54:43 +00:00
|
|
|
# - PR: main, lite build
|
2024-02-06 08:57:00 +00:00
|
|
|
|
2023-02-07 02:29:39 +00:00
|
|
|
trigger: none
|
|
|
|
pr:
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- main
|
|
|
|
- release/*
|
2023-10-19 15:48:49 +00:00
|
|
|
exclude:
|
|
|
|
- release/*.0.2xx
|
|
|
|
- release/*.0.3xx
|
|
|
|
- release/*.0.4xx
|
2023-02-07 02:29:39 +00:00
|
|
|
|
|
|
|
parameters:
|
|
|
|
- name: vmrBranch
|
|
|
|
displayName: dotnet/dotnet branch to push to
|
|
|
|
type: string
|
2023-02-09 09:56:45 +00:00
|
|
|
default: ' '
|
2023-02-07 02:29:39 +00:00
|
|
|
|
2024-02-06 08:57:00 +00:00
|
|
|
- name: disableBuild
|
|
|
|
displayName: Skip the VMR Build stage
|
2023-02-07 02:29:39 +00:00
|
|
|
type: boolean
|
|
|
|
default: false
|
|
|
|
|
|
|
|
variables:
|
2023-02-09 09:56:45 +00:00
|
|
|
- ${{ if ne(parameters.vmrBranch, ' ') }}:
|
2023-02-07 02:29:39 +00:00
|
|
|
- name: VmrBranch
|
2023-02-09 09:56:45 +00:00
|
|
|
value: ${{ replace(parameters.vmrBranch, ' ', '') }}
|
2023-02-07 02:29:39 +00:00
|
|
|
- ${{ else }}:
|
|
|
|
- name: VmrBranch
|
|
|
|
value: ${{ replace(replace(variables['System.PullRequest.TargetBranch'], 'refs/heads/', ''), 'refs/pull/', '') }}
|
|
|
|
|
2024-02-06 08:57:00 +00:00
|
|
|
# enable source-only build for pipelines with the -source-build suffix
|
|
|
|
- name: isSourceOnlyBuild
|
|
|
|
value: ${{ contains(variables['Build.DefinitionName'], '-source-build') }}
|
|
|
|
|
2023-02-07 02:29:39 +00:00
|
|
|
resources:
|
|
|
|
repositories:
|
|
|
|
- repository: vmr
|
|
|
|
type: github
|
|
|
|
name: dotnet/dotnet
|
|
|
|
endpoint: dotnet
|
|
|
|
ref: ${{ variables.VmrBranch }}
|
|
|
|
|
|
|
|
stages:
|
2024-02-06 08:57:00 +00:00
|
|
|
# You can temporarily disable the VMR Build stage by setting the disableBuild variable
|
|
|
|
- ${{ if not(parameters.disableBuild) }}:
|
2023-02-07 02:29:39 +00:00
|
|
|
- template: templates/stages/vmr-build.yml
|
|
|
|
parameters:
|
|
|
|
vmrBranch: ${{ variables.VmrBranch }}
|
|
|
|
isBuiltFromVmr: false
|
2024-02-06 08:57:00 +00:00
|
|
|
isSourceOnlyBuild: ${{ variables.isSourceOnlyBuild }}
|
2024-02-15 19:52:31 +00:00
|
|
|
${{ if contains(variables['Build.DefinitionName'], '-full') }}:
|
|
|
|
scope: full
|
|
|
|
${{ elseif eq(variables.isSourceOnlyBuild, 'true') }}:
|
2024-02-06 08:57:00 +00:00
|
|
|
scope: ultralite
|
|
|
|
${{ else }}:
|
|
|
|
scope: lite
|
2023-02-07 02:29:39 +00:00
|
|
|
|
|
|
|
# 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 }}
|
2023-02-27 15:02:25 +00:00
|
|
|
noPush: true
|