Skip to content

Commit 37b9597

Browse files
authored
Enable assetless builds and clean up YAMLs (#11290)
* Enable assetless builds and clean up YAMLs - azure-pipelines1.yml no longer used. - PR/CI and non-PR scenarios were split into two yamls, so no need to have two eng/pipeline* yamls. Instead, put logic into root yamls. - Make official build assetless. Keep option for Loc. - Clean up PR yaml. Ensure that helix testing is actually running on internal PRs. * Feedback * Test source index + oneloc * Enable source indexing * Revert "Test source index + oneloc" This reverts commit e22c4f6. * Remove comment
1 parent 39cdc69 commit 37b9597

File tree

5 files changed

+148
-642
lines changed

5 files changed

+148
-642
lines changed

azure-pipelines-pr.yml

Lines changed: 124 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,3 @@
1-
# This is a simple wrapper for eng/pipeline.yml to get around the limitation of
2-
# user-defined variables not being available in yaml template expressions.
3-
4-
# Parameters ARE available in template expressions, and parameters can have default values,
5-
# so they can be used to control yaml flow.
6-
#
7-
8-
variables:
9-
# clean the local repo on the build agents
10-
- name: Build.Repository.Clean
11-
value: true
12-
- name: _DotNetArtifactsCategory
13-
value: WINDOWSDESKTOP
14-
- name: _DotNetValidationArtifactsCategory
15-
value: WINDOWSDESKTOP
16-
- ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), eq(variables['Build.Reason'], 'Manual')) }}:
17-
- name: PostBuildSign
18-
value: false
19-
- ${{ else }}:
20-
- name: PostBuildSign
21-
value: true
22-
23-
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
24-
- group: DotNet-Wpf-SDLValidation-Params
25-
26-
27-
# This is set in the pipeline directly
28-
# When set to false, CI tests will not be enabled in builds.
29-
#
30-
# _ContinuousIntegrationTestsEnabled: false
31-
32-
# Setting batch to true, triggers one build at a time.
33-
# if there is a push while a build in progress, it will wait,
34-
# until the running build finishes, and produce a build with all the changes
35-
#
36-
# only trigger ci builds for the master and release branches
371
trigger:
382
batch: true
393
branches:
@@ -59,34 +23,133 @@ pr:
5923
exclude:
6024
- Documentation/*
6125

62-
# Call the pipeline-pr.yml template, which does the real work
26+
variables:
27+
- name: repoName
28+
value: dotnet/wpf
29+
6330
stages:
6431
- stage: build
6532
displayName: Build
6633
jobs:
67-
- template: /eng/pipeline-pr.yml
34+
- template: /eng/common/templates/jobs/jobs.yml@self
6835
parameters:
69-
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
70-
runAsPublic: false
36+
enablePublishBuildArtifacts: true
37+
enablePublishTestResults: false
38+
enablePublishBuildAssets: false
39+
enablePublishUsingPipelines: false
40+
enableTelemetry: true
41+
helixRepo: $(repoName)
7142

72-
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
73-
- template: eng\common\templates\post-build\post-build.yml
74-
parameters:
75-
publishingInfraVersion: 3
76-
enableSymbolValidation: false
77-
enableSigningValidation: false
78-
enableNugetValidation: false
79-
enableSourceLinkValidation: false
80-
# This is to enable SDL runs part of Post-Build Validation Stage
81-
SDLValidationParameters:
82-
enable: false
83-
params: ' -SourceToolsList @("policheck","credscan")
84-
-TsaInstanceURL $(_TsaInstanceURL)
85-
-TsaProjectName $(_TsaProjectName)
86-
-TsaNotificationEmail $(_TsaNotificationEmail)
87-
-TsaCodebaseAdmin $(_TsaCodebaseAdmin)
88-
-TsaBugAreaPath $(_TsaBugAreaPath)
89-
-TsaIterationPath $(_TsaIterationPath)
90-
-TsaRepositoryName "wpf"
91-
-TsaCodebaseName "wpf"
92-
-TsaPublish $True'
43+
jobs:
44+
- job: Windows_NT
45+
timeoutInMinutes: 120 # how long to run the job before automatically cancelling; see https://github.com/dotnet/wpf/issues/952
46+
pool:
47+
# For public jobs, use the hosted pool. For internal jobs use the internal pool.
48+
# Will eventually change this to two BYOC pools.
49+
# agent pool can't be read from a user-defined variable (Azure DevOps limitation)
50+
${{ if eq(variables['System.TeamProject'], 'public') }}:
51+
name: NetCore-Public
52+
demands: ImageOverride -equals windows.vs2022.amd64.Open
53+
${{ if eq(variables['System.TeamProject'], 'internal') }}:
54+
name: NetCore1ESPool-Internal
55+
demands: ImageOverride -equals windows.vs2022.amd64
56+
variables:
57+
- name: _Platform
58+
value: x86
59+
- name: _PlatformArgs
60+
value: /p:Platform=$(_Platform)
61+
- name: _TestHelixAgentPool
62+
value: 'Windows.10.Amd64.ClientRS5.Open' # Preferred:'Windows.10.Amd64.Open%3bWindows.7.Amd64.Open%3bWindows.10.Amd64.ClientRS5.Open'; See https://github.com/dotnet/wpf/issues/952
63+
- name: _HelixStagingDir
64+
value: $(BUILD.STAGINGDIRECTORY)\helix\functests
65+
- name: _HelixSource
66+
value: $(repoName)/$(Build.SourceBranch)
67+
- name: _HelixToken
68+
value: ''
69+
- name: _HelixCreator
70+
value: $(repoName)
71+
- name: _programfilesx86
72+
value: ${Env:ProgramFiles(x86)}/dotnet
73+
- name: _programfiles
74+
value: ${Env:ProgramFiles}/dotnet
75+
- ${{ if ne(variables['System.TeamProject'], 'internal') }}:
76+
- name: _InternalRuntimeDownloadArgs
77+
value: ''
78+
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
79+
- group: AzureDevOps-Artifact-Feeds-Pats
80+
- group: DotNet-HelixApi-Access
81+
- name: _InternalRuntimeDownloadArgs
82+
value: >-
83+
/p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal
84+
/p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
85+
- name: _HelixSource
86+
value: official/$(repoName)/$(Build.SourceBranch)
87+
- name: _HelixToken
88+
value: '$(HelixApiAccessToken)' # from DotNet-HelixApi-Access group
89+
- name: _HelixCreator
90+
value: '' #if _HelixToken is set, Creator must be empty
91+
- name: _TestHelixAgentPool
92+
value: 'Windows.10.Amd64.ClientRS5' # Preferred: 'Windows.10.Amd64%3bWindows.7.Amd64%3bWindows.10.Amd64.ClientRS5'
93+
94+
strategy:
95+
matrix:
96+
Build_Debug_x86:
97+
_BuildConfig: Debug
98+
Build_Release_x86:
99+
_BuildConfig: Release
100+
Build_Debug_x64:
101+
_BuildConfig: Debug
102+
_Coverage: true
103+
# override some variables for debug
104+
# _SignType has to be real for package publishing to succeed - do not override to test.
105+
_Platform: x64
106+
Build_Release_x64:
107+
_BuildConfig: Release
108+
_Platform: x64
109+
Build_Debug_arm64:
110+
_BuildConfig: Debug
111+
# override some variables for debug
112+
# _SignType has to be real for package publishing to succeed - do not override to test.
113+
_Platform: arm64
114+
Build_Release_arm64:
115+
_BuildConfig: Release
116+
_Platform: arm64
117+
steps:
118+
# Set VSO Variable(s)
119+
- powershell: eng\pre-build.ps1
120+
displayName: Pre-Build - Set VSO Variables
121+
122+
- template: /eng/common/templates/steps/enable-internal-sources.yml
123+
- template: /eng/common/templates/steps/enable-internal-runtimes.yml
124+
125+
# Use utility script to run script command dependent on agent OS.
126+
- script: eng\scripts\cibuild.cmd
127+
-configuration $(_BuildConfig)
128+
-prepareMachine
129+
$(_PlatformArgs)
130+
$(_InternalRuntimeDownloadArgs)
131+
/p:Coverage=$(_Coverage)
132+
displayName: Windows Build / Publish
133+
134+
- script: eng\scripts\ciunittest.cmd
135+
-configuration $(_BuildConfig)
136+
-prepareMachine
137+
$(_PlatformArgs)
138+
$(_InternalRuntimeDownloadArgs)
139+
/bl:$(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)\Test.binlog
140+
/p:Coverage=$(_Coverage)
141+
displayName: Run xUnit Tests
142+
condition: eq(variables['_Platform'], 'x64')
143+
144+
- task: PublishTestResults@2
145+
displayName: Publish XUnit Test Results
146+
inputs:
147+
testRunner: VSTest
148+
testResultsFiles: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/*.trx'
149+
mergeTestResults: true
150+
condition: and(succeededOrFailed(), eq(variables['_BuildConfig'], 'Debug'), eq(variables['_Platform'], 'x64'))
151+
152+
# Upload code coverage data
153+
- script: dotnet msbuild -binaryLogger:artifacts\log\$(_BuildConfig)\uploadCodeCov.binlog;ProjectImports=Embed -restore eng/CodeCoverage.proj
154+
displayName: Upload coverage to codecov.io
155+
condition: and(succeeded(), eq(variables['_Coverage'], True), eq(variables['_BuildConfig'], 'Debug'), eq(variables['_Platform'], 'x64'))

azure-pipelines.yml

Lines changed: 24 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,5 @@
1-
# This is a simple wrapper for eng/pipeline.yml to get around the limitation of
2-
# user-defined variables not being available in yaml template expressions.
3-
4-
# Parameters ARE available in template expressions, and parameters can have default values
5-
variables:
6-
# clean the local repo on the build agents
7-
- name: Build.Repository.Clean
8-
value: true
9-
- name: _DotNetArtifactsCategory
10-
value: WINDOWSDESKTOP
11-
- name: _DotNetValidationArtifactsCategory
12-
value: WINDOWSDESKTOP
13-
- ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), eq(variables['Build.Reason'], 'Manual')) }}:
14-
- name: PostBuildSign
15-
value: false
16-
- ${{ else }}:
17-
- name: PostBuildSign
18-
value: true
19-
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
20-
- group: DotNet-Wpf-SDLValidation-Params
1+
# This pipeline does not do any real building of assets. It just publishing commit info to Maestro, which is used to trigger codeflow to the VMR.
2+
# All building of assets happens in the VMR.
213
trigger:
224
batch: true
235
branches:
@@ -29,6 +11,8 @@ trigger:
2911
paths:
3012
exclude:
3113
- Documentation/*
14+
pr: none
15+
3216
resources:
3317
repositories:
3418
- repository: 1ESPipelineTemplates
@@ -38,35 +22,32 @@ resources:
3822
extends:
3923
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
4024
parameters:
41-
sdl:
42-
policheck:
43-
enabled: true
44-
tsa:
45-
enabled: true
46-
configFile: '$(Build.SourcesDirectory)/eng/tsaoptions.json'
47-
featureFlags:
48-
autoBaseline: true
49-
# This prefast enablement causes compilation issues in STL.
50-
autoEnablePREfastWithNewRuleset: false
5125
pool:
5226
name: NetCore1ESPool-Internal
5327
image: 1es-windows-2022
5428
os: windows
55-
customBuildTags:
56-
- ES365AIMigrationTooling
5729
stages:
5830
- stage: build
5931
displayName: Build
6032
jobs:
61-
- template: /eng/pipeline.yml@self
62-
parameters:
63-
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
64-
runAsPublic: false
65-
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
66-
- template: /eng/common/templates-official/post-build/post-build.yml@self
33+
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}:
34+
- template: /eng/common/templates-official/job/onelocbuild.yml@self
35+
parameters:
36+
MirrorRepo: wpf
37+
LclSource: lclFilesfromPackage
38+
LclPackageId: 'LCL-JUNO-PROD-WPF'
39+
- template: /eng/common/templates-official/jobs/jobs.yml@self
6740
parameters:
68-
publishingInfraVersion: 3
69-
enableSymbolValidation: false
70-
enableSigningValidation: false
71-
enableNugetValidation: false
72-
enableSourceLinkValidation: false
41+
enablePublishBuildArtifacts: true
42+
enablePublishBuildAssets: false
43+
enablePublishTestResults: false
44+
publishAssetsImmediately: true
45+
isAssetlessBuild: true
46+
enableTelemetry: true
47+
enableSourceIndex: true
48+
sourceIndexParams:
49+
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
50+
binlogPath: artifacts/log/Debug/x86/Build.binlog
51+
pool:
52+
name: NetCore1ESPool-Internal
53+
demands: ImageOverride -equals windows.vs2022.amd64

azure-pipelines1.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)