-
Notifications
You must be signed in to change notification settings - Fork 292
Expand file tree
/
Copy pathazure-pipelines-official.yml
More file actions
260 lines (237 loc) · 9.34 KB
/
azure-pipelines-official.yml
File metadata and controls
260 lines (237 loc) · 9.34 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
# Branches that trigger a build on commit
trigger:
branches:
include:
- main
- rel/*
exclude:
- rel/2.*
- rel/3.0.*
paths:
exclude:
- .github/**
- .gitignore
parameters:
- name: isRTM
displayName: "Produce RTM version?"
type: boolean
default: False
- name: products
displayName: "Select the products to generate"
type: string
default: all
values:
- all
- mstest
- testing-platform
# This option should be used with caution. This is useful for unblocking circular deps issue with testanywhere
- name: SkipTests
displayName: "Skip tests"
type: boolean
default: False
- name: codeQLForce
displayName: "Try collecting CodeQL before default CodeQL cadence"
type: boolean
default: False
variables:
- template: /eng/common/templates-official/variables/pool-providers.yml@self
# Cannot use key:value syntax in root defined variables
- name: _TeamName
value: MSTest
- name: _RunAsInternal
value: True
- name: _RunAsPublic
value: False
- name: _ReleaseVersionKind
value: ''
- name: _BuildConfig
value: Release
- name: _Products
value: ${{parameters.products}}
# _SignType and _Sign are required for signing even if not used directly here
- name: _SignType
value: real
- name: _Sign
value: True
- ${{ if eq(parameters.isRTM, True) }}:
- name: _ReleaseVersionKind
value: release
# Set to 0 to force CodeQL scan without waiting 72 from last attempt (even if it failed).
# This is only a hint for the tool, it might reject to run it if it already has up to date data.
# See the Starting Code QL step for details.
- ${{ if eq(parameters.codeQLForce, True) }}:
- name: Codeql.Cadence
value: 0
resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
sdl:
policheck:
enabled: true
tsa:
enabled: true
featureFlags:
autoBaseline: true
pool:
name: $(DncEngInternalBuildPool)
image: windows.vs2026preview.scout.amd64
os: windows
settings:
networkIsolationPolicy: Permissive,CFSClean
customBuildTags:
- ES365AIMigrationTooling
stages:
- stage: build
displayName: Build
jobs:
- template: /eng/common/templates-official/jobs/jobs.yml@self
parameters:
enableMicrobuild: true
enablePublishTestResults: true
testResultsFormat: 'vstest'
publishingVersion: 4
artifacts:
publish:
logs: true
manifests: true
enableTelemetry: true
jobs:
- job: Windows
enablePublishing: true
timeoutInMinutes: 90
pool:
name: $(DncEngInternalBuildPool)
image: windows.vs2026preview.scout.amd64
os: windows
steps:
- task: PowerShell@2
displayName: 'Install Windows SDK'
inputs:
targetType: filePath
filePath: './eng/install-windows-sdk.ps1'
failOnStderr: true
showWarnings: true
- task: PowerShell@2
displayName: 'Install procdump'
inputs:
targetType: filePath
filePath: ./eng/install-procdump.ps1
failOnStderr: true
showWarnings: true
- task: PowerShell@2
displayName: 'Install Access Database Engine'
inputs:
targetType: filePath
filePath: ./eng/install-access-database-engine.ps1
failOnStderr: true
showWarnings: true
- script: eng\common\CIBuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
/p:TeamName=$(_TeamName)
/p:DotNetFinalVersionKind=$(_ReleaseVersionKind)
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
/p:ProductsToBuild=$(_Products)
/p:Test=false
name: Build
displayName: Build
env:
# https://github.com/microsoft/testfx/issues/6767
DOTNET_HOST_PATH: '$(Build.SourcesDirectory)/.dotnet/dotnet.exe'
- ${{ if eq(parameters.SkipTests, False) }}:
# -ci is allowing to import some environment variables and some required configurations
- script: Test.cmd
-configuration $(_BuildConfig)
-ci
-nobl
/bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog
name: Test
displayName: Test
env:
TESTINGPLATFORM_DEFAULT_HANG_TIMEOUT: 5m
DOTNET_ROOT: $(Build.SourcesDirectory)/.dotnet
- task: CopyFiles@2
displayName: 'Copy binlogs'
inputs:
SourceFolder: '$(Build.SourcesDirectory)/artifacts/tmp/$(_BuildConfig)/testsuite'
Contents: |
**/*.binlog
TargetFolder: '$(Build.ArtifactStagingDirectory)/binlogs'
condition: always()
- task: 1ES.PublishBuildArtifacts@1
displayName: 'Publish integration tests binlogs'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/binlogs'
ArtifactName: Integration_Tests_Windows_Binlogs_$(_BuildConfig)
condition: always()
# Remove temporary artifacts to avoid finding binskim issues for exes we don't own.
- pwsh: |
Remove-Item -Path $(Build.SourcesDirectory)/artifacts/tmp -Recurse -Force
displayName: Remove artifacts/tmp
- task: 1ES.PublishBuildArtifacts@1
displayName: 'Publish Test Results folders'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
ArtifactName: TestResults_Windows_Attempt$(System.JobAttempt)
condition: always()
- task: NuGetAuthenticate@1
displayName: 'NuGet Authenticate to test-tools feed'
# Final builds should not go into test-tools package feed, so we can keep re-building them until we are ready to ship to nuget.org.
# This has to depend on the parameter and not on variable, variables are not defined early enough to be used in templating condition.
# We still need the final builds on test-tools so that internal repos can consume it, so we will publish it manually.
- ${{ if eq(parameters.isRTM, False) }}:
- task: 1ES.PublishNuget@1
displayName: 'Publish NuGet packages to test-tools feed'
inputs:
# Do not push symbol packages nor Microsoft.Testing.Platform package
packageParentPath: '$(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)'
packagesToPush: '$(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/**/*.nupkg;!$(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/**/*.symbols.nupkg;!$(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/NonShipping/Microsoft.Testing.Platform.*.nupkg'
publishVstsFeed: 'public/test-tools'
- job: Linux
timeoutInMinutes: 90
pool:
name: $(DncEngInternalBuildPool)
image: 1es-ubuntu-2204
os: linux
steps:
- script: eng/common/build.sh
-configuration $(_BuildConfig)
-prepareMachine
--restore
--build
--pack
/p:Test=false
/p:NonWindowsBuild=true
displayName: Build
- ${{ if eq(parameters.SkipTests, False) }}:
# -ci is allowing to import some environment variables and some required configurations
- script: |
chmod +x ./test.sh
./test.sh --configuration $(_BuildConfig) --ci --test --integrationTest --nobl /bl:$(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig)/TestStep.binlog
name: Test
displayName: Tests
env:
TESTINGPLATFORM_DEFAULT_HANG_TIMEOUT: 5m
DOTNET_ROOT: $(Build.SourcesDirectory)/.dotnet
- task: 1ES.PublishBuildArtifacts@1
displayName: 'Publish Test Results folders'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
ArtifactName: TestResults_Linux_Attempt$(System.JobAttempt)
condition: always()
- ${{ if eq(variables['Build.SourceBranchName'], 'main') }}:
- template: /eng/common/templates-official/job/onelocbuild.yml@self
parameters:
GitHubOrg: microsoft
MirrorRepo: testfx
LclSource: lclFilesfromPackage
LclPackageId: 'LCL-JUNO-PROD-TESTFX'
- template: eng/common/templates-official/post-build/post-build.yml@self
parameters:
publishingInfraVersion: 4