forked from dotnet/aspnetcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathci.yml
More file actions
372 lines (350 loc) · 13.8 KB
/
Copy pathci.yml
File metadata and controls
372 lines (350 loc) · 13.8 KB
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
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
#
# See https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema for details on this file.
#
# Configure which branches trigger builds
trigger:
batch: true
branches:
include:
- master
- release/*
# Run PR validation on all branches
pr:
autoCancel: true
branches:
include:
- '*'
jobs:
- template: jobs/default-build.yml
parameters:
jobName: Code_check
jobDisplayName: Code check
agentOs: Windows
installJdk: false
steps:
- powershell: ./eng/scripts/CodeCheck.ps1 -ci
displayName: Run eng/scripts/CodeCheck.ps1
# Build Windows (x64/x86)
- template: jobs/default-build.yml
parameters:
codeSign: true
jobName: Windows_build
jobDisplayName: "Build: Windows x64/x86"
agentOs: Windows
steps:
- script: "echo ##vso[build.addbuildtag]daily-build"
condition: and(ne(variables['Build.Reason'], 'PullRequest'), ne(variables['IsFinalBuild'], 'true'))
displayName: 'Set CI tags'
- script: "echo ##vso[build.addbuildtag]release-candidate"
condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['IsFinalBuild'], 'true'))
displayName: 'Set CI tags'
# !!! NOTE !!! Some of these steps have disabled code signing.
# This is intentional to workaround https://github.com/dotnet/arcade/issues/1957 which always re-submits for code-signing, even
# if they have already been signed. This results in slower builds due to re-submitting the same .nupkg many times for signing.
# The sign settings have been configured to
- script: ./eng/scripts/cibuild.cmd -arch x64 /p:DisableCodeSigning=true /bl:artifacts/logs/build.x64.binlog
displayName: Build x64
# TODO: make it possible to build for one Windows architecture at a time
# This is going to actually build x86 native assets. See https://github.com/aspnet/AspNetCore/issues/7196
# Build the x86 shared framework
# Set DisableSignCheck because we'll run sign check in an explicit step after installers build
- script: ./eng/scripts/cibuild.cmd -arch x86 -NoRestore /t:BuildSharedFx /p:DisableCodeSigning=true /bl:artifacts/logs/build.x86.binlog
displayName: Build x86
# This is in a separate build step with -forceCoreMsbuild to workaround MAX_PATH limitations - https://github.com/Microsoft/msbuild/issues/53
- script: ./build.cmd -ci -sign -forceCoreMsbuild /p:DisableCodeSigning=true -projects ./src/SiteExtensions/LoggingAggregate/src/Microsoft.AspNetCore.AzureAppServices.SiteExtension/Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj
displayName: Build SiteExtension
# Remove all task build output
- script: rmdir /s /q build\tasks\bin
displayName: Clear task build output
# This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If https://github.com/dotnet/arcade/issues/1957 is resolved,
# consider running code-signing inline with the other previous steps.
# Sign check is disabled because it is run in a separate step below, after installers are built.
- script: ./build.cmd -ci -sign -NoRestore /t:CodeSign /p:SignType=$(_SignType) /p:DisableSignCheck=true /bl:artifacts/logs/build.codesign.binlog
displayName: Code sign packages
# Windows installers bundle both x86 and x64 assets
- powershell: ./src/Installers/Windows/build.ps1 -ci /p:SignType=$(_SignType)
displayName: Build Installers
# Run sign check to verify everything was code signed.
- script: ./build.cmd -ci -sign -NoRestore /t:SignCheck /p:SignType=$(_SignType) /bl:artifacts/logs/build.signcheck.binlog
displayName: Run sign check
condition: eq(variables['_SignType'], 'real')
artifacts:
- name: Windows_Packages
path: artifacts/packages/
- name: Windows_VSIX
path: artifacts/VSSetup/
- name: Windows_Manifests
path: artifacts/manifests/
- name: Windows_Installers
path: artifacts/installers/
- name: Windows_Logs
path: artifacts/logs/
publishOnError: true
# Build Windows ARM
- template: jobs/default-build.yml
parameters:
codeSign: true
jobName: Windows_arm_build
jobDisplayName: "Build: Windows ARM"
agentOs: Windows
buildScript: ./eng/scripts/cibuild.cmd
buildArgs: -arch arm -NoBuildNodeJS -NoBuildJava /p:SignType=$(_SignType) /bl:artifacts/logs/build.win-arm.binlog
installNodeJs: false
installJdk: false
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so builds only produce runtime packages
- powershell: gci artifacts/packages/ -recurse -exclude 'runtime.*', 'Microsoft.AspNetCore.App.Runtime.*' -file | rm -ea ignore
artifacts:
- name: Windows_arm_Packages
path: artifacts/packages/
- name: Windows_arm_Manifests
path: artifacts/manifests/
- name: Windows_arm_Installers
path: artifacts/installers/
- name: Windows_arm_Logs
path: artifacts/logs/
publishOnError: true
# Build MacOS
- template: jobs/default-build.yml
parameters:
jobName: MacOs_x64_build
jobDisplayName: "Build: macOS"
agentOs: macOs
buildScript: ./eng/scripts/cibuild.sh
buildArgs: --no-build-nodejs --no-build-java /bl:artifacts/logs/build.macos.binlog
installNodeJs: false
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so macOS/Linux builds only produce runtime packages
- script: if [ -d 'artifacts/packages' ]; then find artifacts/packages/ -type f -not -name 'runtime.*' -not -name 'Microsoft.AspNetCore.App.Runtime.*' -delete; fi
condition: always()
artifacts:
- name: MacOS_x64_Packages
path: artifacts/packages/
- name: MacOS_x64_Manifests
path: artifacts/manifests/
- name: MacOS_x64_Installers
path: artifacts/installers/
- name: MacOS_x64_Logs
path: artifacts/logs/
publishOnError: true
- template: jobs/codesign-xplat.yml
parameters:
inputName: MacOS_x64
# Build Linux x64
- template: jobs/default-build.yml
parameters:
jobName: Linux_x64_build
jobDisplayName: "Build: Linux x64"
agentOs: Linux
installNodeJs: false
steps:
- script: ./eng/scripts/cibuild.sh --arch x64 --no-build-nodejs --no-build-java /bl:artifacts/logs/build.lin-x64.binlog
displayName: Run cibuild.sh
- script: |
rm -rf .dotnet/
git clean -xfd src/
./dockerbuild.sh bionic \
--ci --pack --all --no-build-nodejs --no-build-java \
--arch x64 \
-e KOREBUILD_SKIP_INSTALL_NETFX=0 \
--no-restore \
--no-build-deps \
/t:BuildSharedFx \
/p:BuildRuntimeArchive=false \
/p:LinuxInstallerType=deb \
/bl:artifacts/logs/build.deb.binlog
displayName: Build Debian installers
- script: |
rm -rf .dotnet/
git clean -xfd src/
./dockerbuild.sh rhel \
--ci --pack --all --no-build-nodejs --no-build-java \
--arch x64 \
-e KOREBUILD_SKIP_INSTALL_NETFX=0 \
--no-restore \
--no-build-deps \
/t:BuildSharedFx \
/p:BuildRuntimeArchive=false \
/p:LinuxInstallerType=rpm \
/bl:artifacts/logs/build.rpm.binlog
displayName: Build RPM installers
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so macOS/Linux builds only produce runtime packages
- script: if [ -d 'artifacts/packages' ]; then find artifacts/packages/ -type f -not -name 'runtime.*' -not -name 'Microsoft.AspNetCore.App.Runtime.*' -delete; fi
condition: always()
artifacts:
- name: Linux_x64_Packages
path: artifacts/packages/
- name: Linux_x64_Manifests
path: artifacts/manifests/
- name: Linux_x64_Installers
path: artifacts/installers/
- name: Linux_x64_Logs
path: artifacts/logs/
publishOnError: true
- template: jobs/codesign-xplat.yml
parameters:
inputName: Linux_x64
# Build Linux ARM
- template: jobs/default-build.yml
parameters:
jobName: Linux_arm_build
jobDisplayName: "Build: Linux ARM"
agentOs: Linux
buildScript: ./eng/scripts/cibuild.sh
buildArgs: --arch arm --no-build-nodejs --no-build-java /bl:artifacts/logs/build.lin-arm.binlog
installNodeJs: false
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so macOS/Linux builds only produce runtime packages
- script: if [ -d 'artifacts/packages' ]; then find artifacts/packages/ -type f -not -name 'runtime.*' -not -name 'Microsoft.AspNetCore.App.Runtime.*' -delete; fi
condition: always()
artifacts:
- name: Linux_arm_Packages
path: artifacts/packages/
- name: Linux_arm_Manifests
path: artifacts/manifests/
- name: Linux_arm_Installers
path: artifacts/installers/
- name: Linux_arm_Logs
path: artifacts/logs/
publishOnError: true
- template: jobs/codesign-xplat.yml
parameters:
inputName: Linux_arm
# Build Linux ARM64
- template: jobs/default-build.yml
parameters:
jobName: Linux_arm64_build
jobDisplayName: "Build: Linux ARM64"
agentOs: Linux
buildScript: ./eng/scripts/cibuild.sh
buildArgs: --arch arm64 --no-build-nodejs --no-build-java /bl:artifacts/logs/build.arm64.binlog
installNodeJs: false
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so macOS/Linux builds only produce runtime packages
- script: if [ -d 'artifacts/packages' ]; then find artifacts/packages/ -type f -not -name 'runtime.*' -not -name 'Microsoft.AspNetCore.App.Runtime.*' -delete; fi
condition: always()
artifacts:
- name: Linux_arm64_Packages
path: artifacts/packages/
- name: Linux_arm64_Manifests
path: artifacts/manifests/
- name: Linux_arm64_Installers
path: artifacts/installers/
- name: Linux_arm64_Logs
path: artifacts/logs/
publishOnError: true
- template: jobs/codesign-xplat.yml
parameters:
inputName: Linux_arm64
# Build Linux Musl x64
- template: jobs/default-build.yml
parameters:
jobName: Linux_musl_x64_build
jobDisplayName: "Build: Linux Musl x64"
agentOs: Linux
buildScript: ./dockerbuild.sh alpine
buildArgs: --ci --pack --all -e KOREBUILD_SKIP_INSTALL_NETFX=0 --arch x64 --os-name linux-musl --no-build-nodejs --no-build-java /bl:artifacts/logs/build.musl.binlog
installNodeJs: false
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so macOS/Linux builds only produce runtime packages
- script: if [ -d 'artifacts/packages' ]; then find artifacts/packages/ -type f -not -name 'runtime.*' -not -name 'Microsoft.AspNetCore.App.Runtime.*' -delete; fi
condition: always()
artifacts:
- name: Linux_musl_x64_Packages
path: artifacts/packages/
- name: Linux_musl_x64_Manifests
path: artifacts/manifests/
- name: Linux_musl_x64_Installers
path: artifacts/installers/
- name: Linux_musl_x64_Logs
path: artifacts/logs/
publishOnError: true
- template: jobs/codesign-xplat.yml
parameters:
inputName: Linux_musl_x64
# Test jobs
- template: jobs/default-build.yml
parameters:
condition: ne(variables['SkipTests'], 'true')
jobName: Windows_Test
jobDisplayName: "Test: Windows Server 2016 x64"
agentOs: Windows
isTestingJob: true
buildScript: ./eng/scripts/cibuild.cmd
buildArgs: -test "/p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=true /p:RunTemplateTests=false /p:BuildSiteExtensions=false"
beforeBuild:
- powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
displayName: Setup IISExpress test certificates and schema
afterBuild:
- powershell: "& ./build.ps1 -CI -NoBuild -Test /p:RunFlakyTests=true"
displayName: Run Flaky Tests
continueOnError: true
artifacts:
- name: Windows_Test_Logs
path: artifacts/logs/
publishOnError: true
- template: jobs/default-build.yml
parameters:
condition: ne(variables['SkipTests'], 'true')
jobName: Windows_Templates_Test
jobDisplayName: "Test: Templates - Windows Server 2016 x64"
agentOs: Windows
isTestingJob: true
buildScript: ./src/ProjectTemplates/build.cmd
buildArgs: -ci -test -NoRestore -NoBuild -NoBuilddeps "/p:RunTemplateTests=true /p:BuildSiteExtensions=false"
beforeBuild:
- powershell: ./eng/scripts/cibuild.cmd
displayName: Build Repo
artifacts:
- name: Windows_Test_Templates_Logs
path: artifacts/logs/
publishOnError: true
- template: jobs/default-build.yml
parameters:
condition: ne(variables['SkipTests'], 'true')
jobName: MacOs_Test
jobDisplayName: "Test: macOS 10.13"
agentOs: macOs
isTestingJob: true
buildScript: ./eng/scripts/cibuild.sh
buildArgs: --test
beforeBuild:
- bash: "./eng/scripts/install-nginx-mac.sh"
displayName: Installing Nginx
afterBuild:
- bash: ./build.sh --no-build --ci --test -p:RunFlakyTests=true
displayName: Run Flaky Tests
continueOnError: true
artifacts:
- name: MacOS_Test_Logs
path: artifacts/logs/
publishOnError: true
- template: jobs/default-build.yml
parameters:
condition: ne(variables['SkipTests'], 'true')
jobName: Linux_Test
jobDisplayName: "Test: Ubuntu 16.04 x64"
agentOs: Linux
isTestingJob: true
buildScript: ./eng/scripts/cibuild.sh
buildArgs: --test
beforeBuild:
- bash: "./eng/scripts/install-nginx-linux.sh"
displayName: Installing Nginx
- bash: "echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p"
displayName: Increase inotify limit
afterBuild:
- bash: ./build.sh --no-build --ci --test -p:RunFlakyTests=true
displayName: Run Flaky Tests
continueOnError: true
artifacts:
- name: Linux_Test_Logs
path: artifacts/logs/
publishOnError: true