forked from dotnet/wcf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-arcade.yml
296 lines (278 loc) · 11.1 KB
/
azure-pipelines-arcade.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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# trigger ci builds for merged PRs into listed branches
# Setting batch to true, triggers one build at a time.
# if there is a push while a build in progress, it will wait,
# until the running build finishes, and produce a build with all the changes
trigger:
batch: true
branches:
include:
- master
- release/3.0.0
# trigger ci builds for pull requests into listed branches
pr:
branches:
include:
- master
- release/3.0.0
variables:
- name: _TeamName
value: WcfCore
- name: _PublishUsingPipelines
value: true
- name: _DotNetArtifactsCategory
value: .NETCore
- name: _RunAsPublic
value: true
- name: _RunAsInternal
value: false
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- name: _RunAsPublic
value: false
- name: _RunAsInternal
value: true
resources:
containers:
- container: ubuntu_1604_Powershell_62
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-coredeps-d9d81d0-20190612203614
stages:
- stage: Build
displayName: Build
jobs:
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enableMicrobuild: true
enablePublishBuildArtifacts: true
enablePublishBuildAssets: true
enablePublishUsingPipelines: $(_PublishUsingPipelines)
enableTelemetry: true
graphFileGeneration:
enabled: true
includeToolset: true
helixRepo: dotnet/wcf
jobs:
- job: Windows
timeoutInMinutes: 90
pool:
${{ if eq(variables._RunAsPublic, True) }}:
name: NetCorePublic-Pool
queue: buildpool.windows.10.amd64.vs2017.open
${{ if eq(variables._RunAsInternal, True) }}:
name: NetCoreInternal-Pool
queue: buildpool.windows.10.amd64.vs2017
variables:
- _InternalBuildArgs: ''
- HelixApiAccessToken: ''
- _TestArgs: /p:ServiceUri=$(_serviceUri) /p:Root_Certificate_Installed=true /p:Client_Certificate_Installed=true /p:SSL_Available=true
# Internal/Official Build Variables
- ${{ if eq(variables._RunAsInternal, True) }}:
# Only enable publishing in non-public, non PR scenarios.
# DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
# DotNet-HelixApi-Access provides: HelixApiAccessToken
- group: DotNet-Blob-Feed
- group: Publish-Build-Assets
- group: DotNet-HelixApi-Access
- _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
- _InternalBuildArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName)
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
/p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl)
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
# Service uri needed for integration tests in official builds
- _serviceUri: wcfcoresrv5.cloudapp.net/wcftestservice1
# Public/PR & CI Build Variables
- ${{ if eq(variables._RunAsPublic, True) }}:
# For PR and CI test runs we use a different server machine that host multiple services to avoid concurrency issues.
- _serviceUri: wcfcoresrv2.cloudapp.net/WcfService$(_WcfPRServiceId)
# For PR and CI test runs we need to update the Service being used by Scenario tests.
# Used in UpdatePRService.yml
# I think this can be removed based on the logic, setting it to true for now.
- _updateService: true
# Send to Helix variables
- _xUnitWorkItemTimeout: '00:10:00'
strategy:
matrix:
Release:
_BuildConfig: Release
# PRs or external builds are not signed.
${{ if eq(variables._RunAsPublic, True) }}:
_SignType: test
_DotNetPublishToBlobFeed : false
_WcfPRServiceId: 1
${{ if eq(variables._RunAsInternal, True) }}:
_SignType: real
_DotNetPublishToBlobFeed : true
${{ if eq(variables._RunAsPublic, True) }}:
Debug:
_BuildConfig: Debug
_SignType: test
_DotNetPublishToBlobFeed : false
_WcfPRServiceId: 2
steps:
- checkout: self
clean: true
- ${{ if eq(variables._RunAsPublic, True) }}:
- template: /eng/UpdatePRService.yml
parameters:
wcfPRServiceId: $(_WcfPRServiceId)
- script: eng\common\cibuild.cmd
-configuration $(_BuildConfig)
-preparemachine
$(_InternalBuildArgs)
$(_TestArgs)
/p:Test=false
displayName: Windows Build / Publish
- powershell: eng\common\build.ps1
-configuration $(_BuildConfig)
-preparemachine
-ci
-test
-integrationTest
-projects $(Build.SourcesDirectory)/eng/SendToHelix.proj
$(_TestArgs)
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog
displayName: Windows - Run Helix Tests
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
HelixAccessToken: $(HelixApiAccessToken)
XUnitWorkItemTimeout: $(_xUnitWorkItemTimeout)
RunAsPublic: $(_RunAsPublic)
RunAsInternal: $(_RunAsInternal)
IsWindowsBuild: true
# Only build and test Unix in PR and CI builds.
- ${{ if eq(variables._RunAsPublic, True) }}:
- job: Linux
timeoutInMinutes: 90
container: ubuntu_1604_Powershell_62
pool:
name: NetCorePublic-Pool
queue: BuildPool.Ubuntu.1604.Amd64.Open
variables:
- _TestArgs: /p:ServiceUri=$(_serviceUri) /p:Root_Certificate_Installed=true /p:Client_Certificate_Installed=true /p:SSL_Available=true
- _serviceUri: wcfcoresrv2.cloudapp.net/WcfService$(_WcfPRServiceId)
- _updateService: true
# Send to Helix variables
- _xUnitWorkItemTimeout: '00:10:00'
strategy:
matrix:
Release:
_BuildConfig: Release
_SignType: none
_DotNetPublishToBlobFeed : false
_WcfPRServiceId: 3
_PublishType: none
Debug:
_BuildConfig: Debug
_SignType: none
_DotNetPublishToBlobFeed : false
_WcfPRServiceId: 4
_PublishType: none
steps:
- checkout: self
clean: true
- template: /eng/UpdatePRService.yml
parameters:
wcfPRServiceId: $(_WcfPRServiceId)
- script: eng/common/cibuild.sh
-configuration $(_BuildConfig)
-preparemachine
$(_TestArgs)
/p:Test=false
displayName: Unix Build
- script: eng/common/build.sh
--configuration $(_BuildConfig)
--prepareMachine
--ci
--test
--integrationTest
--projects $(Build.SourcesDirectory)/eng/SendToHelix.proj
$(_TestArgs)
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog
displayName: Linux - Run Helix Tests
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
ServiceHost: $(_serviceUri)
RunAsPublic: $(_RunAsPublic)
RunAsInternal: $(_RunAsInternal)
IsWindowsBuild: false
# Only build and test Unix in PR and CI builds.
- ${{ if eq(variables._RunAsPublic, True) }}:
- job: MacOS
timeoutInMinutes: 90
pool:
name: Hosted macOS
queue: OSX.1013.Amd64.Open
variables:
- _TestArgs: /p:ServiceUri=$(_serviceUri) /p:Root_Certificate_Installed=true /p:Client_Certificate_Installed=true /p:SSL_Available=true
- _serviceUri: wcfcoresrv2.cloudapp.net/WcfService$(_WcfPRServiceId)
- _updateService: true
# Send to Helix variables
- _xUnitWorkItemTimeout: '00:10:00'
strategy:
matrix:
Release:
_BuildConfig: Release
_SignType: none
_DotNetPublishToBlobFeed : false
_WcfPRServiceId: 5
_PublishType: none
Debug:
_BuildConfig: Debug
_SignType: none
_DotNetPublishToBlobFeed : false
_WcfPRServiceId: 6
_PublishType: none
steps:
- checkout: self
clean: true
- template: /eng/UpdatePRService.yml
parameters:
wcfPRServiceId: $(_WcfPRServiceId)
- script: eng/common/cibuild.sh
-configuration $(_BuildConfig)
-preparemachine
$(_TestArgs)
/p:Test=false
displayName: Unix Build
- script: eng/common/build.sh
--configuration $(_BuildConfig)
--prepareMachine
--ci
--test
--integrationTest
--projects $(Build.SourcesDirectory)/eng/SendToHelix.proj
$(_TestArgs)
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog
displayName: Linux - Run Helix Tests
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
ServiceHost: $(_serviceUri)
RunAsPublic: $(_RunAsPublic)
RunAsInternal: $(_RunAsInternal)
IsWindowsBuild: false
- ${{ if eq(variables._RunAsInternal, True) }}:
- template: eng\common\templates\post-build\post-build.yml
parameters:
dependsOn:
- Build
# Symbol validation isn't being very reliable lately. This should be enabled back
# once this issue is resolved: https://github.com/dotnet/arcade/issues/2871
enableSymbolValidation: false
# Sourcelink validation isn't passing for Arcade due to some regressions. This should be
# enabled back once this issue is resolved: https://github.com/dotnet/arcade/issues/2912
enableSourceLinkValidation: false
# This is to enable SDL runs part of Post-Build Validation Stage
SDLValidationParameters:
enable: true
params: ' -SourceToolsList @("policheck","credscan")
-TsaInstanceURL "https://devdiv.visualstudio.com/"
-TsaProjectName "DEVDIV"
-TsaNotificationEmail "[email protected]"
-TsaCodebaseAdmin "REDMOND\stebon"
-TsaBugAreaPath "DevDiv\NET\NET Core"
-TsaIterationPath "DevDiv"
-TsaRepositoryName "WCF"
-TsaCodebaseName "WCF"
-TsaPublish $True'