-
Notifications
You must be signed in to change notification settings - Fork 31
/
azure-pipelines-pr.yml
134 lines (124 loc) · 4.52 KB
/
azure-pipelines-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
variables:
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
- name: PoolProvider
value: NetCore-Public
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- name: PoolProvider
value: NetCore1ESPool-Internal
trigger: none
pr:
branches:
include:
- '*'
resources:
containers:
- container: LinuxContainer
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm
stages:
- stage: build
displayName: Build
jobs:
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enableMicrobuild: true
enablePublishBuildArtifacts: true
enablePublishBuildAssets: true
enablePublishUsingPipelines: true
enableTelemetry: true
enableSourceBuild: true
helixRepo: dotnet/arcade-validation
jobs:
- job: Windows_NT
pool:
name: $(PoolProvider) # This is a queue-time parameter; Public default is NetCore-Public; Internal default is NetCore1ESPool-Internal
demands: ImageOverride -equals windows.vs2022.amd64.open
strategy:
matrix:
Build_Release:
_BuildConfig: Release
# PRs or external builds are not signed.
_SignType: test
Build_Debug:
_BuildConfig: Debug
_SignType: test
steps:
- checkout: self
clean: true
# Use utility script to run script command dependent on agent OS.
- script: eng\common\cibuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
displayName: Windows Build / Publish
- task: ComponentGovernanceComponentDetection@0
displayName: Component Governance scan
- job: Linux
container: LinuxContainer
pool:
name: $(PoolProvider) # This is a queue-time parameter; Public default is NetCore-Public; Internal default is NetCore1ESPool-Internal
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
strategy:
matrix:
Build_Debug:
_BuildConfig: Debug
_SignType: none # Test signing is not supported on Linux and macOS.
Build_Release:
_BuildConfig: Release
_SignType: none # Test signing is not supported on Linux and macOS.
steps:
- checkout: self
clean: true
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
--sign
displayName: Unix Build / Publish
- task: ComponentGovernanceComponentDetection@0
displayName: Component Governance scan
- job: MacOS
pool:
vmImage: macos-12
strategy:
matrix:
Build_Debug:
_BuildConfig: Debug
_SignType: none # Test signing is not supported on Linux and macOS.
Build_Release:
_BuildConfig: Release
_SignType: none # Test signing is not supported on Linux and macOS.
steps:
- checkout: self
clean: true
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
--sign
displayName: Unix Build / Publish
- task: ComponentGovernanceComponentDetection@0
displayName: Component Governance scan
- job: Validate_Helix
pool:
name: $(PoolProvider)
demands: ImageOverride -equals windows.vs2022.amd64.open
variables:
- HelixApiAccessToken: ''
- _BuildConfig: Release
- name: skipComponentGovernanceDetection
value: true
steps:
- template: /eng/common/templates/steps/send-to-helix.yml
parameters:
HelixType: test/product/
XUnitProjects: $(Build.SourcesDirectory)/src/Validation/tests/Validation.Tests.csproj
XUnitTargetFramework: netcoreapp2.0
XUnitRunnerVersion: 2.5.1
XUnitPublishTargetFramework: net9.0
IncludeDotNetCli: true
DotNetCliPackageType: sdk
DotNetCliVersion: 9.0.100
EnableXUnitReporter: true
WaitForWorkItemCompletion: true
HelixTargetQueues: Windows.Amd64.Server2022.Open;(Debian.12.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:debian-12-helix-amd64
HelixSource: pr/dotnet/arcade-validation/$(Build.SourceBranch)
IsExternal: true
Creator: arcade-validation
displayName: Validate Helix