-
Notifications
You must be signed in to change notification settings - Fork 193
/
azure-pipelines-conditional-integration.yml
146 lines (128 loc) · 4.26 KB
/
azure-pipelines-conditional-integration.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
#
# See https://docs.microsoft.com/azure/devops/pipelines/yaml-schema for reference.
#
variables:
- template: /eng/common/templates/variables/pool-providers.yml
- name: Build.Repository.Clean
value: true
- name: _TeamName
value: AspNetCore
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: true
- name: LogLevel
value: 'All'
- name: RAZOR_RUN_CONDITIONAL_IDE_TESTS
value: 'true'
- name: Codeql.Enabled
value: false
- name: Codeql.SkipTaskAutoInjection
value: true
trigger: none
pr: none
schedules:
- cron: '0 */12 * * *'
displayName: Every 12 hours
branches:
include:
- main
always: true # run the pipeline even if there are no code changes
stages:
- stage: build
displayName: Build
jobs:
# Windows based jobs. This needs to be separate from Unix based jobs because it generates
# TRX files. That can only be toggled at the top level template level, not at the individual
# job.
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enablePublishBuildArtifacts: false
enablePublishTestResults: true
enableTelemetry: true
helixRepo: dotnet/razor
helixType: build.product/
jobs:
- job: Windows
timeoutInMinutes: 120
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals windows.vs2022preview.scout.amd64.open
strategy:
matrix:
debug:
_BuildConfig: Debug
_PublishArgs: ''
release:
_BuildConfig: Release
_PublishArgs: ''
variables:
- _BuildArgs: ''
- XUNIT_LOGS: '$(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)'
- __VSNeverShowWhatsNew: 1
steps:
- task: NuGetCommand@2
displayName: 'Clear NuGet caches'
condition: succeeded()
inputs:
command: custom
arguments: 'locals all -clear'
- powershell: ./eng/scripts/InstallProcDump.ps1
displayName: Install ProcDump
- powershell: ./eng/scripts/StartDumpCollectionForHangingBuilds.ps1
$(ProcDumpPath)procdump.exe artifacts/log/$(_BuildConfig)
(Get-Date).AddMinutes(60)
devenv, xunit.console, xunit.console.x86
displayName: Start background dump collection
# Don't create a binary log until we can customize the name
# https://github.com/dotnet/arcade/pull/12988
- script: eng\cibuild.cmd
-configuration $(_BuildConfig)
-msbuildEngine vs
-prepareMachine
-restore
-nobl
name: Restore
displayName: Restore
condition: succeeded()
- powershell: eng\SetupVSHive.ps1
displayName: Setup VS Hive
- script: eng\cibuild.cmd
-configuration $(_BuildConfig)
-msbuildEngine vs
-prepareMachine
-build
-pack
-publish
-sign
$(_BuildArgs)
$(_PublishArgs)
$(_InternalRuntimeDownloadArgs)
name: Build
displayName: Build and Deploy
condition: succeeded()
- script: eng\CIBuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
-test
-nobl
name: Run_Unit_Tests
displayName: Run Unit Tests
condition: succeeded()
- script: eng\CIBuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
-integrationTest
name: Run_Integration_Tests
displayName: Run Integration Tests
condition: succeeded()
- powershell: ./eng/scripts/FinishDumpCollectionForHangingBuilds.ps1 artifacts/log/$(_BuildConfig)
displayName: Finish background dump collection
continueOnError: true
condition: always()
- publish: artifacts/log/$(_BuildConfig)
artifact: $(Agent.Os)_$(Agent.JobName) Attempt $(System.JobAttempt) Logs
displayName: Publish Build Artifacts
condition: always()
- publish: artifacts/TestResults/$(_BuildConfig)
artifact: $(Agent.Os)_$(Agent.JobName) Attempt $(System.JobAttempt) TestResults
displayName: Publish Test Artifacts
condition: always()