This repository has been archived by the owner on Apr 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
/
azure-pipelines.yml
164 lines (147 loc) · 5.7 KB
/
azure-pipelines.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
trigger:
- main
pr:
autoCancel: true
branches:
include:
- main
- release/*
paths:
exclude:
- docs/*
- THIRD-PARTY-NOTICES.TXT
- License.txt
variables:
- name: _TeamName
value: DotNetCore
- name: _SignType
value: real
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
# DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1
# DotNet-Diagnostics-SDL-Params provides Tsa* variables for SDL checks.
# DotNet-Symbol-Server-Pats provides: provides microsoft-symbol-server-pat and symweb-symbol-server-pat
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
- group: DotNet-Blob-Feed
- group: DotNet-Diagnostics-SDL-Params
- group: DotNet-Symbol-Server-Pats
- group: Publish-Build-Assets
resources:
containers:
- container: LinuxContainer
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04
stages:
- stage: build
displayName: Build and Test SymStore
# Three jobs for each of the three OSes we want to run on
jobs:
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enableMicrobuild: true
enableTelemetry: true
enablePublishBuildArtifacts: true
enablePublishTestResults: true
helixRepo: dotnet/symstore
jobs:
- job: Windows_NT
pool:
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
name: NetCore-Public
demands: ImageOverride -equals windows.vs2022.amd64.open
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals windows.vs2022.amd64
variables:
- DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX: 2
- _InternalBuildArgs: ''
strategy:
matrix:
build_debug:
_BuildConfig: Debug
_InternalBuildArgs: ''
build_release:
_BuildConfig: Release
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
_InternalBuildArgs: /p:DotNetSignType=$(_SignType)
/p:TeamName=$(_TeamName)
/p:DotNetPublishUsingPipelines=$(PublishPackages)
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
steps:
- script: eng\common\cibuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
-verbosity normal
$(_InternalBuildArgs)
name: Build
displayName: Build
condition: succeeded()
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
- job: Linux
container: LinuxContainer
pool:
vmImage: ubuntu-22.04
strategy:
matrix:
debug:
_BuildConfig: Debug
release:
_BuildConfig: Release
steps:
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
name: Build
displayName: Build
condition: succeeded()
- job: MacOS
pool:
vmImage: macOS-latest
strategy:
matrix:
debug:
_BuildConfig: Debug
release:
_BuildConfig: Release
steps:
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
name: Build
displayName: Build
condition: succeeded()
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates/job/publish-build-assets.yml
parameters:
configuration: Release
dependsOn: Windows_NT
publishUsingPipelines: true
pool:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals windows.vs2022.amd64
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates/post-build/post-build.yml
parameters:
# This is to enable SDL runs part of Post-Build Validation Stage.
# as well as NuGet, SourceLink, and signing validation.
# The variables get imported from group dotnet-diagnostics-sdl-params
publishingInfraVersion: 3
enableSourceLinkValidation: true
enableSigningValidation: true
enableSymbolValidation: false
enableNugetValidation: true
symbolPublishingAdditionalParameters: '/p:PublishSpecialClrFiles=false'
publishInstallersAndChecksums: true
SDLValidationParameters:
enable: true
continueOnError: false
params: ' -SourceToolsList @("policheck","credscan")
-TsaInstanceURL $(_TsaInstanceURL)
-TsaProjectName $(_TsaProjectName)
-TsaNotificationEmail $(_TsaNotificationEmail)
-TsaCodebaseAdmin $(_TsaCodebaseAdmin)
-TsaBugAreaPath $(_TsaBugAreaPath)
-TsaIterationPath $(_TsaIterationPath)
-TsaRepositoryName "symstore"
-TsaCodebaseName "symstore"
-TsaPublish $True'
artifactNames:
- 'PackageArtifacts'