Migrate VMR-related pipelines to 1ES templates (#19100)

This commit is contained in:
Přemek Vysoký 2024-03-25 12:06:00 +01:00 committed by GitHub
parent 0d5c4d50bf
commit e39c438bf2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 264 additions and 310 deletions

View file

@ -101,7 +101,6 @@ jobs:
condition: succeededOrFailed()
dependsOn: ${{ parameters.reuseBuildArtifactsFrom }}_${{ parameters.architecture }}
variables:
- 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'), not(startswith(parameters.vmrBranch, 'internal/release/')), not(eq(variables['Build.Reason'], 'PullRequest'))) }}:
@ -128,9 +127,36 @@ jobs:
- name: sourcesPath
value: $(vmrPath)
templateContext:
outputs:
- output: pipelineArtifact
displayName: Publish BuildLogs
condition: succeededOrFailed()
targetPath: $(Build.StagingDirectory)/BuildLogs
artifactName: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt)
- output: pipelineArtifact
displayName: Publish Artifacts
condition: and(succeededOrFailed(), eq(variables['hasAssets'], 'true'))
targetPath: $(sourcesPath)/artifacts/assets/Release/
artifactName: $(Agent.JobName)_Artifacts
- ${{ if ne(parameters.buildSourceOnly, 'true') }}:
- output: pipelineArtifact
displayName: Publish Packages
targetPath: $(sourcesPath)/artifacts/packages/Release/
artifactName: $(Agent.JobName)_Packages
- ${{ if not(parameters.isBuiltFromVmr) }}:
- output: pipelineArtifact
displayName: Upload failed patches
condition: failed()
targetPath: $(Agent.TempDirectory)
artifactName: $(System.JobDisplayName)_FailedPatches
steps:
- ${{ if not(parameters.isBuiltFromVmr) }}:
- template: ../steps/vmr-prepare.yml
- template: ../steps/vmr-prepare.yml@self
parameters:
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
vmrBranch: $(System.PullRequest.TargetBranch)
@ -139,7 +165,7 @@ jobs:
# Synchronize new content in the VMR during PRs (we expect this to come
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- template: ../steps/vmr-pull-updates.yml
- template: ../steps/vmr-pull-updates.yml@self
parameters:
vmrPath: $(vmrPath)
vmrBranch: ${{ parameters.vmrBranch }}
@ -402,12 +428,6 @@ jobs:
continueOnError: true
condition: succeededOrFailed()
- publish: '$(Build.StagingDirectory)/BuildLogs'
artifact: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt)
displayName: Publish BuildLogs
continueOnError: true
condition: succeededOrFailed()
# Only upload test results if enabled
- ${{ if eq(parameters.runTests, 'True') }}:
- task: PublishTestResults@2
@ -421,15 +441,3 @@ jobs:
mergeTestResults: true
publishRunAttachments: true
testRunTitle: SourceBuild_SmokeTests_$(Agent.JobName)
- publish: '$(sourcesPath)/artifacts/assets/Release/'
artifact: $(Agent.JobName)_Artifacts
displayName: Publish Artifacts
condition: and(succeededOrFailed(), eq(variables['hasAssets'], 'true'))
continueOnError: true
# When building from source, the Private.SourceBuilt.Artifacts archive already contains the nuget packages
- ${{ if ne(parameters.buildSourceOnly, 'true') }}:
- publish: '$(sourcesPath)/artifacts/packages/Release/'
artifact: $(Agent.JobName)_Packages
displayName: Publish Packages

View file

@ -22,7 +22,10 @@ jobs:
displayName: Synchronize VMR's ${{ parameters.vmrBranch }}
timeoutInMinutes: 120
variables:
- template: /eng/common/templates/variables/pool-providers.yml
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
- template: /eng/common/templates/variables/pool-providers.yml
- ${{ else }}:
- template: /eng/common/templates-official/variables/pool-providers.yml
- name: vmrPath
value: $(Agent.BuildDirectory)/vmr
- ${{ if not(parameters.noPush) }}:
@ -40,23 +43,17 @@ jobs:
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals Build.Ubuntu.2004.Amd64.Open
${{ if eq(variables['System.TeamProject'], 'internal') }}:
image: 1es-ubuntu-2004-open
os: linux
${{ else }}:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals Build.Ubuntu.2004.Amd64
demands: ImageOverride -equals 1es-ubuntu-2004
os: linux
steps:
- template: ../steps/vmr-prepare.yml
parameters:
vmrBranch: ${{ parameters.vmrBranch }}
# TODO (https://github.com/dotnet/arcade/issues/11332): Allow full CG?
# Currently, we ignore dirs of individual repos - they have been scanned before
- ${{ if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal')) }}:
- task: ComponentGovernanceComponentDetection@0
inputs:
sourceScanPath: $(Agent.BuildDirectory)/vmr
ignoreDirectories: $(Agent.BuildDirectory)/vmr/src
- template: ../steps/vmr-pull-updates.yml
parameters:

View file

@ -28,6 +28,39 @@ parameters:
type: boolean
default: false
# These are not expected to be passed it but rather just object variables reused below
- name: pool_Linux
type: object
default:
name: $(defaultPoolName)
image: $(poolImage_Linux)
demands: ImageOverride -equals $(poolImage_Linux)
os: linux
- name: pool_Windows
type: object
default:
name: $(defaultPoolName)
image: $(poolImage_Windows)
demands: ImageOverride -equals $(poolImage_Windows)
os: windows
- name: pool_LinuxArm64
type: object
default:
name: $(poolName_LinuxArm64)
image: $(poolImage_LinuxArm64)
demands: ImageOverride -equals $(poolImage_Linux)
hostArchitecture: Arm64
os: linux
- name: pool_Mac
type: object
default:
name: Azure Pipelines
vmImage: $(poolImage_Mac)
os: macOS
#### SOURCE-ONLY BUILD ####
stages:
- ${{ if parameters.isSourceOnlyBuild }}:
@ -35,9 +68,10 @@ stages:
displayName: VMR Source-Only Build
dependsOn: []
variables:
- template: ../variables/vmr-stage.yml
- template: ../variables/vmr-build.yml
parameters:
vmrBranch: ${{ parameters.vmrBranch }}
jobs:
### Jobs for ultralite builds ###
@ -48,9 +82,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.centOSStream8Container }}
buildFromArchive: false # 🚫
buildSourceOnly: true # ✅
@ -71,9 +103,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.centOSStream8Container }}
buildFromArchive: false # 🚫
buildSourceOnly: true # ✅
@ -93,9 +123,7 @@ stages:
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
artifactsRid: alpine.3.19-x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.alpine319Container }}
buildFromArchive: false # 🚫
buildSourceOnly: true # ✅
@ -116,9 +144,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.alpine319Container }}
buildFromArchive: false # 🚫
buildSourceOnly: true # ✅
@ -136,9 +162,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.centOSStream8Container }}
buildFromArchive: true # ✅
buildSourceOnly: true # ✅
@ -157,9 +181,7 @@ stages:
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
artifactsRid: centos.8-x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.centOSStream8Container }}
buildFromArchive: false # 🚫
buildSourceOnly: true # ✅
@ -178,9 +200,7 @@ stages:
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
artifactsRid: centos.8-x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.centOSStream8Container }}
buildFromArchive: false # 🚫
buildSourceOnly: true # ✅
@ -198,9 +218,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.centOSStream8Container }}
buildFromArchive: true # ✅
buildSourceOnly: true # ✅
@ -218,9 +236,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.centOSStream9Container }}
buildFromArchive: true # ✅
buildSourceOnly: true # ✅
@ -238,9 +254,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.fedora39Container }}
buildFromArchive: true # ✅
buildSourceOnly: true # ✅
@ -258,9 +272,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.ubuntu2204Container }}
buildFromArchive: false # 🚫
buildSourceOnly: true # ✅
@ -278,7 +290,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm64
pool: ${{ variables.defaultPoolNameLinuxArm64 }}
pool: ${{ parameters.pool_LinuxArm64 }}
container: ${{ variables.ubuntu2204ArmContainer }}
buildFromArchive: false # 🚫
buildSourceOnly: true # ✅
@ -296,9 +308,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.fedora39Container }}
buildFromArchive: false # 🚫
buildSourceOnly: true # ✅
@ -316,7 +326,7 @@ stages:
displayName: VMR Vertical Build
dependsOn: []
variables:
- template: ../variables/vmr-stage.yml
- template: ../variables/vmr-build.yml
parameters:
vmrBranch: ${{ parameters.vmrBranch }}
jobs:
@ -327,9 +337,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.ubuntu2204Container }}
targetOS: linux
targetArchitecture: x64
@ -340,9 +348,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsWindows }}
pool: ${{ parameters.pool_Windows }}
targetOS: windows
targetArchitecture: x64
@ -352,9 +358,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.androidCrossContainer }}
targetOS: android
targetArchitecture: arm64
@ -365,9 +369,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: wasm
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.browserCrossContainer }}
crossRootFs: '/crossrootfs/x64'
targetOS: browser
@ -379,8 +381,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: iossimulator
targetArchitecture: arm64
@ -393,9 +394,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.androidCrossContainer }}
targetOS: android
targetArchitecture: arm
@ -406,9 +405,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.androidCrossContainer }}
targetOS: android
targetArchitecture: x64
@ -419,9 +416,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x86
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.androidCrossContainer }}
targetOS: android
targetArchitecture: x86
@ -432,9 +427,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: wasm
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.browserCrossContainer }}
crossRootFs: '/crossrootfs/x64'
targetOS: browser
@ -447,9 +440,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.androidCrossContainer }}
crossRootFs: '/crossrootfs/x64'
targetOS: linux-bionic
@ -461,9 +452,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.androidCrossContainer }}
crossRootFs: '/crossrootfs/x64'
targetOS: linux-bionic
@ -476,9 +465,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.androidCrossContainer }}
crossRootFs: '/crossrootfs/x64'
targetOS: linux-bionic
@ -490,9 +477,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.androidCrossContainer }}
crossRootFs: '/crossrootfs/x64'
targetOS: linux-bionic
@ -505,8 +490,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: ios
targetArchitecture: arm64
@ -516,8 +500,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: ios
targetArchitecture: arm64
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
@ -528,8 +511,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: iossimulator
targetArchitecture: arm64
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
@ -540,8 +522,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: iossimulator
targetArchitecture: x64
@ -551,8 +532,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: iossimulator
targetArchitecture: x64
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
@ -563,8 +543,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: maccatalyst
targetArchitecture: arm64
@ -574,8 +553,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: maccatalyst
targetArchitecture: arm64
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
@ -586,8 +564,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: maccatalyst
targetArchitecture: x64
@ -597,8 +574,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: maccatalyst
targetArchitecture: x64
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
@ -609,8 +585,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: tvos
targetArchitecture: arm64
@ -620,8 +595,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: tvos
targetArchitecture: arm64
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
@ -632,8 +606,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: tvossimulator
targetArchitecture: arm64
@ -643,8 +616,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: tvossimulator
targetArchitecture: arm64
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
@ -655,8 +627,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: tvossimulator
targetArchitecture: x64
@ -666,8 +637,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: tvossimulator
targetArchitecture: x64
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
@ -678,9 +648,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: wasm
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.wasiCrossContainer }}
crossRootFs: '/crossrootfs/x64'
targetOS: wasi
@ -692,8 +660,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: osx
targetArchitecture: x64
@ -703,8 +670,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
useMonoRuntime: true
targetOS: osx
targetArchitecture: x64
@ -715,9 +681,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.marinerX64CrossContainer }}
crossRootFs: '/crossrootfs/x64'
targetOS: linux
@ -729,9 +693,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsLinux }}
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.marinerX64CrossContainer }}
crossRootFs: '/crossrootfs/x64'
useMonoRuntime: true
@ -746,9 +708,7 @@ stages:
# isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
# vmrBranch: ${{ variables.VmrBranch }}
# architecture: arm64
# pool:
# name: ${{ variables.defaultPoolName }}
# demands: ${{ variables.defaultPoolDemandsLinux }}
# pool: ${{ parameters.pool_Linux }}
# container: ${{ variables.marinerArm64CrossContainer }}
# crossRootFs: '/crossrootfs/arm64'
# targetOS: linux
@ -760,8 +720,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
targetOS: osx
targetArchitecture: arm64
@ -771,8 +730,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm64
pool:
vmImage: ${{ variables.defaultPoolNameMac }}
pool: ${{ parameters.pool_Mac }}
useMonoRuntime: true
targetOS: osx
targetArchitecture: arm64
@ -783,9 +741,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: arm64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsWindows }}
pool: ${{ parameters.pool_Windows }}
targetOS: windows
targetArchitecture: arm64
@ -795,9 +751,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsWindows }}
pool: ${{ parameters.pool_Windows }}
useMonoRuntime: true
targetOS: windows
targetArchitecture: x64
@ -808,9 +762,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x86
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsWindows }}
pool: ${{ parameters.pool_Windows }}
targetOS: windows
targetArchitecture: x86
@ -820,9 +772,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x86
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsWindows }}
pool: ${{ parameters.pool_Windows }}
useMonoRuntime: true
targetOS: windows
targetArchitecture: x86
@ -833,9 +783,7 @@ stages:
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool:
name: ${{ variables.defaultPoolName }}
demands: ${{ variables.defaultPoolDemandsWindows }}
pool: ${{ parameters.pool_Windows }}
targetOS: windows
targetArchitecture: x64
extraProperties: /p:PgoInstrument=true

View file

@ -88,7 +88,8 @@ steps:
condition: eq(variables['Agent.OS'], 'Windows_NT')
workingDirectory: $(Agent.BuildDirectory)/installer
- publish: $(Agent.TempDirectory)
artifact: $(System.JobDisplayName)_FailedPatches
displayName: Upload failed patches
condition: failed()
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- publish: $(Agent.TempDirectory)
artifact: $(System.JobDisplayName)_FailedPatches
displayName: Upload failed patches
condition: failed()

View file

@ -1,5 +1,5 @@
parameters:
- name: vmrBranch
- name: vmrBranch
type: string
variables:
@ -36,26 +36,30 @@ variables:
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
- name: defaultPoolName
value: NetCore-Public-XL
- name: defaultPoolNameLinuxArm64
- name: poolImage_Linux
value: 1es-ubuntu-2004-open
- name: poolImage_LinuxArm64
value: Mariner-2-Docker-ARM64
- name: poolName_LinuxArm64
value: Docker-Linux-Arm-Public
- name: defaultPoolNameMac
- name: poolImage_Mac
value: macos-12
- name: defaultPoolDemandsLinux
value: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open
- name: defaultPoolDemandsWindows
value: ImageOverride -equals windows.vs2022.amd64.open
- ${{ elseif eq(variables['System.TeamProject'], 'internal') }}:
- name: poolImage_Windows
value: windows.vs2022.amd64.open
- ${{ else }}:
- ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
- name: defaultPoolName
value: NetCore1ESPool-Internal-XL
- ${{ else }}:
- name: defaultPoolName
value: NetCore1ESPool-Svc-Internal
- name: defaultPoolNameLinuxArm64
value: $(DncEngInternalBuildPool)
- name: poolImage_Linux
value: 1es-ubuntu-2204
- name: poolImage_LinuxArm64
value: Mariner-2-Docker-ARM64
- name: poolName_LinuxArm64
value: Docker-Linux-Arm-Internal
- name: defaultPoolNameMac
- name: poolImage_Mac
value: macos-13-arm64
- name: defaultPoolDemandsLinux
value: ImageOverride -equals Build.Ubuntu.2204.Amd64
- name: defaultPoolDemandsWindows
value: ImageOverride -equals windows.vs2022.amd64
- name: poolImage_Windows
value: windows.vs2022.amd64

View file

@ -1,9 +1,11 @@
# This yml is used by these pipelines and triggers:
# This YAML is used by these PR pipelines:
#
# - installer-source-build (public)
# - PR: release/* and main, ultralite build
# - installer-unified-build (public)
# - PR: main, lite build
# - installer-source-build
# https://dev.azure.com/dnceng-public/public/_build?definitionId=233
# - installer-unified-build
# https://dev.azure.com/dnceng-public/public/_build?definitionId=277
# - installer-unified-build-full
# https://dev.azure.com/dnceng-public/public/_build?definitionId=279
trigger: none
pr:
@ -28,6 +30,8 @@ parameters:
default: false
variables:
- template: /eng/common/templates/variables/pool-providers.yml@self
- ${{ if ne(parameters.vmrBranch, ' ') }}:
- name: VmrBranch
value: ${{ replace(parameters.vmrBranch, ' ', '') }}

View file

@ -1,75 +0,0 @@
# This yml is used by these pipelines and triggers:
#
# - installer-source-build (public)
# - PR: release/* and main, ultralite build
# - installer-unified-build (public)
# - PR: main, lite build
trigger: none
pr:
branches:
include:
- main
- release/*
exclude:
- release/*.0.2xx
- release/*.0.3xx
- release/*.0.4xx
parameters:
- name: vmrBranch
displayName: dotnet/dotnet branch to push to
type: string
default: ' '
- name: disableBuild
displayName: Skip the VMR Build stage
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/', '') }}
# enable source-only build for pipelines with the -source-build suffix
- name: isSourceOnlyBuild
value: ${{ contains(variables['Build.DefinitionName'], '-source-build') }}
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 disableBuild variable
- ${{ if not(parameters.disableBuild) }}:
- template: templates/stages/vmr-build.yml
parameters:
vmrBranch: ${{ variables.VmrBranch }}
isBuiltFromVmr: false
isSourceOnlyBuild: ${{ variables.isSourceOnlyBuild }}
${{ if contains(variables['Build.DefinitionName'], '-full') }}:
scope: full
${{ elseif eq(variables.isSourceOnlyBuild, 'true') }}:
scope: ultralite
${{ else }}:
scope: lite
# 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

View file

@ -17,21 +17,48 @@ resources:
name: dotnet-dotnet
ref: $(Build.SourceBranch)
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
parameters:
- name: vmrBranch
displayName: dotnet-dotnet branch to push to
type: string
default: ' '
variables:
variables:
- template: /eng/common/templates-official/variables/pool-providers.yml@self
- ${{ if ne(parameters.vmrBranch, ' ') }}:
- name: VmrBranch
value: ${{ replace(parameters.vmrBranch, ' ', '') }}
- ${{ else }}:
- name: VmrBranch
value: ${{ replace(replace(variables['Build.SourceBranch'], 'refs/heads/', ''), 'refs/pull/', '') }}
jobs:
- template: templates/jobs/vmr-synchronization.yml
parameters:
vmrBranch: ${{ variables.VmrBranch }}
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
pool:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022-pt
os: windows
sdl:
sourceRepositoriesToScan:
exclude:
- repository: vmr
componentgovernance:
sourceScanPath: $(Agent.BuildDirectory)/vmr
ignoreDirectories: $(Agent.BuildDirectory)/vmr/src
stages:
- stage: VMRSynchronization
displayName: VMR Synchronization
jobs:
- template: templates/jobs/vmr-synchronization.yml@self
parameters:
vmrBranch: ${{ variables.VmrBranch }}

View file

@ -19,6 +19,11 @@ resources:
endpoint: dotnet
ref: $(Build.SourceBranch)
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
parameters:
- name: vmrBranch
displayName: dotnet/dotnet branch to push to
@ -26,6 +31,8 @@ parameters:
default: ' '
variables:
- template: /eng/common/templates-official/variables/pool-providers.yml@self
- ${{ if ne(parameters.vmrBranch, ' ') }}:
- name: VmrBranch
value: ${{ replace(parameters.vmrBranch, ' ', '') }}
@ -33,7 +40,28 @@ variables:
- name: VmrBranch
value: ${{ replace(replace(variables['Build.SourceBranch'], 'refs/heads/', ''), 'refs/pull/', '') }}
jobs:
- template: /eng/pipelines/templates/jobs/vmr-synchronization.yml
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
vmrBranch: ${{ variables.VmrBranch }}
pool:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022-pt
os: windows
sdl:
sourceRepositoriesToScan:
exclude:
- repository: vmr
componentgovernance:
sourceScanPath: $(Agent.BuildDirectory)/vmr
ignoreDirectories: $(Agent.BuildDirectory)/vmr/src
stages:
- stage: VMRSynchronization
displayName: VMR Synchronization
jobs:
- template: /eng/pipelines/templates/jobs/vmr-synchronization.yml@self
parameters:
jobName: Synchronize_VMR
vmrBranch: ${{ variables.VmrBranch }}

View file

@ -43,21 +43,39 @@ variables:
- name: isPRTrigger
value: ${{ eq(variables['Build.Reason'], 'PullRequest') }}
stages:
- ${{ if and(ne(variables.isPRTrigger, 'true'), eq(variables['System.TeamProject'], 'internal')) }}:
- template: templates/stages/vmr-scan.yml
- template: /eng/common/templates-official/variables/pool-providers.yml@self
- template: /src/installer/eng/pipelines/templates/stages/vmr-build.yml
resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
isBuiltFromVmr: true
isSourceOnlyBuild: ${{ variables.isSourceOnlyBuild }}
${{ if eq(variables.isScheduleTrigger, 'true') }}:
scope: full
${{ elseif eq(variables.isSourceOnlyBuildLite, 'true') }}:
scope: lite
${{ elseif and(eq(variables.isPRTrigger, 'true'), eq(variables.isSourceOnlyBuild, 'true')) }}:
scope: ultralite
${{ elseif and(eq(variables.isPRTrigger, 'true'), ne(variables.isSourceOnlyBuild, 'true')) }}:
scope: lite
${{ else }}:
scope: full
sdl:
sourceAnalysisPool:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
os: windows
stages:
- ${{ if and(ne(variables.isPRTrigger, 'true'), eq(variables['System.TeamProject'], 'internal')) }}:
- template: /eng/pipelines/templates/stages/vmr-scan.yml@self
- template: /src/installer/eng/pipelines/templates/stages/vmr-build.yml@self
parameters:
isBuiltFromVmr: true
isSourceOnlyBuild: ${{ variables.isSourceOnlyBuild }}
${{ if eq(variables.isScheduleTrigger, 'true') }}:
scope: full
${{ elseif eq(variables.isSourceOnlyBuildLite, 'true') }}:
scope: lite
${{ elseif and(eq(variables.isPRTrigger, 'true'), eq(variables.isSourceOnlyBuild, 'true')) }}:
scope: ultralite
${{ elseif and(eq(variables.isPRTrigger, 'true'), ne(variables.isSourceOnlyBuild, 'true')) }}:
scope: lite
${{ else }}:
scope: full

View file

@ -34,10 +34,9 @@ variables:
- name: isPRTrigger
value: ${{ eq(variables['Build.Reason'], 'PullRequest') }}
stages:
- ${{ if and(ne(variables.isPRTrigger, 'true'), eq(variables['System.TeamProject'], 'internal')) }}:
- template: templates/stages/vmr-scan.yml
- template: /eng/common/templates/variables/pool-providers.yml@self
stages:
- template: /src/installer/eng/pipelines/templates/stages/vmr-build.yml
parameters:
isBuiltFromVmr: true

View file

@ -2,18 +2,13 @@ stages:
- stage: Tag_n_Scan
displayName: Tag & Scan
dependsOn: []
variables:
- template: /eng/common/templates/variables/pool-providers.yml
jobs:
- job: Tag_n_Scan
displayName: Tag & Scan
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals Build.Ubuntu.2004.Amd64.Open
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals Build.Ubuntu.2004.Amd64
name: $(DncEngInternalBuildPool)
image: 1es-ubuntu-2004
os: linux
steps:
- checkout: self