Skip to content

Commit ff55644

Browse files
[automated] Merge branch 'vs17.11' => 'vs17.12' (#12446)
1 parent 07bbc79 commit ff55644

File tree

11 files changed

+386
-266
lines changed

11 files changed

+386
-266
lines changed

.vsts-dotnet-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,4 +424,4 @@ jobs:
424424
PathtoPublish: '$(Build.ArtifactStagingDirectory)/Verify'
425425
ArtifactName: 'macOS Verify $(System.JobAttempt)'
426426

427-
- template: /eng/common/templates/jobs/source-build.yml
427+
- template: /eng/common/templates/jobs/source-build.yml

.vsts-dotnet.yml

Lines changed: 40 additions & 248 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
trigger:
22
- main
33
- vs*
4-
- exp/*
5-
- perf/*
64

75
# If defined here, these values are not overrideable
86
# Once they exist, we should define these as "runtime parameters"
@@ -16,10 +14,14 @@ parameters:
1614
displayName: Optional OptProfDrop Override
1715
type: string
1816
default: 'default'
19-
- name: EnableOptProf
17+
- name: enableOptProf
2018
displayName: Enable OptProf data collection for this build
2119
type: boolean
2220
default: true
21+
- name: enableSigningValidation
22+
displayName: Enable Signing Validation
23+
type: boolean
24+
default: true
2325

2426
variables:
2527
# if OptProfDrop is not set, string '$(OptProfDrop)' will be passed to the build script.
@@ -34,7 +36,7 @@ variables:
3436
# if OptProfDropName is set as a parameter, set OptProfDrop to the parameter and unset SourceBranch
3537
- ${{ if ne(parameters.OptProfDropName, 'default') }}:
3638
- name: OptProfDrop
37-
value: ${{parameters.OptProfDropName}}
39+
value: ${{ parameters.OptProfDropName }}
3840
- name: SourceBranch
3941
value: ''
4042
# Override SkipApplyOptimizationData to true when disabling OptProf data collection
@@ -83,260 +85,50 @@ extends:
8385
suppressionsFile: $(Build.SourcesDirectory)/eng/CredScanSuppressions.json
8486

8587
stages:
88+
- ${{ if or(startsWith(variables['Build.SourceBranch'], 'refs/heads/vs'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}:
89+
- stage: localization
90+
displayName: Localization
91+
jobs:
92+
# The localization setup for release/ branches. Note difference in LclPackageId. main branch is handled separately below.
93+
# Used for vs17.2, vs17.4, vs17.6 etc. branches only.
94+
# When the branch is setup for localization (the localization ticket needs to be created - https://aka.ms/ceChangeLocConfig, requesting change from one release branch to another),
95+
# set 'EnableReleaseOneLocBuild' to true.
96+
- ${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/vs') }}:
97+
- template: /eng/common/templates-official/job/onelocbuild.yml@self
98+
parameters:
99+
MirrorRepo: 'msbuild'
100+
LclSource: lclFilesfromPackage
101+
LclPackageId: 'LCL-JUNO-PROD-MSBUILDREL'
102+
MirrorBranch: ${{ replace(variables['Build.SourceBranch'], 'refs/heads/', '') }}
103+
JobNameSuffix: '_release'
104+
condition: ${{ variables.EnableReleaseOneLocBuild }}
105+
# The localization setup for main branch. Note difference in package ID. Should not be used with release/ branches.
106+
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}:
107+
- template: /eng/common/templates-official/job/onelocbuild.yml@self
108+
parameters:
109+
MirrorRepo: 'msbuild'
110+
LclSource: lclFilesfromPackage
111+
LclPackageId: 'LCL-JUNO-PROD-MSBUILD'
112+
MirrorBranch: 'main'
113+
JobNameSuffix: '_main'
114+
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
115+
86116
- stage: build
87117
displayName: Build
88-
89118
jobs:
90-
# The localization setup for release/ branches. Note difference in LclPackageId. main branch is handled separately below.
91-
# Used for vs17.2, vs17.4, vs17.6 etc. branches only.
92-
# When the branch is setup for localization (the localization ticket needs to be created - https://aka.ms/ceChangeLocConfig, requesting change from one release branch to another),
93-
# set 'EnableReleaseOneLocBuild' to true.
94-
- ${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/vs') }}:
95-
- template: /eng/common/templates-official/job/onelocbuild.yml@self
96-
parameters:
97-
MirrorRepo: 'msbuild'
98-
LclSource: lclFilesfromPackage
99-
LclPackageId: 'LCL-JUNO-PROD-MSBUILDREL'
100-
MirrorBranch: ${{ replace(variables['Build.SourceBranch'], 'refs/heads/', '') }}
101-
JobNameSuffix: '_release'
102-
condition: ${{ variables.EnableReleaseOneLocBuild }}
103-
# The localization setup for main branch. Note difference in package ID. Should not be used with release/ branches.
104-
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}:
105-
- template: /eng/common/templates-official/job/onelocbuild.yml@self
106-
parameters:
107-
MirrorRepo: 'msbuild'
108-
LclSource: lclFilesfromPackage
109-
LclPackageId: 'LCL-JUNO-PROD-MSBUILD'
110-
MirrorBranch: 'main'
111-
JobNameSuffix: '_main'
112-
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
113-
114-
- job: Windows_NT
115-
pool:
116-
name: VSEngSS-MicroBuild2022-1ES
117-
demands:
118-
- agent.os -equals Windows_NT
119-
120-
timeoutInMinutes: 180
121-
122-
variables:
123-
- group: Publish-Build-Assets
124-
- name: TeamName
125-
value: MSBuild
126-
- name: VisualStudio.MajorVersion
127-
value: 17
128-
- name: VisualStudio.ChannelName
129-
value: 'int.d17.12' # MSBuild's vs17.12 branch corresponds to this VS channel
130-
- name: VisualStudio.DropName
131-
value: Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber)
132-
133-
steps:
134-
- task: NuGetToolInstaller@1
135-
displayName: 'Install NuGet.exe'
136-
- pwsh: Get-MpComputerStatus
137-
138-
- pwsh: Set-MpPreference -DisableRealtimeMonitoring $true
139-
140-
- task: PowerShell@2
141-
displayName: Setup Private Feeds Credentials
142-
inputs:
143-
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
144-
arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
145-
env:
146-
Token: $(dn-bot-dnceng-artifact-feeds-rw)
147-
148-
- task: NuGetCommand@2
149-
displayName: Restore internal tools
150-
inputs:
151-
command: restore
152-
feedsToUse: config
153-
restoreSolution: 'eng\common\internal\Tools.csproj'
154-
nugetConfigPath: 'eng\common\internal\NuGet.config'
155-
restoreDirectory: '$(Build.SourcesDirectory)\.packages'
156-
157-
- task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1
158-
inputs:
159-
signType: $(SignType)
160-
zipSources: false
161-
condition: and(succeeded(), in(variables['SignType'], 'test', 'real'))
162-
163-
- task: MicroBuildOptProfPlugin@6
164-
inputs:
165-
ProfilingInputsDropName: '$(VisualStudio.DropName)'
166-
ShouldSkipOptimize: true
167-
AccessToken: '$(System.AccessToken)'
168-
feedSource: 'https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json'
169-
displayName: 'Install OptProf Plugin'
170-
condition: and(succeeded(), ${{ parameters.EnableOptProf }})
171-
172-
# Required by MicroBuildBuildVSBootstrapper
173-
- task: MicroBuildSwixPlugin@4
174-
inputs:
175-
dropName: $(VisualStudio.DropName)
176-
177-
- script: eng/CIBuild.cmd
178-
-configuration $(BuildConfiguration)
179-
-officialBuildId $(Build.BuildNumber)
180-
-officialSkipApplyOptimizationData $(SkipApplyOptimizationData)
181-
/p:RepositoryName=$(Build.Repository.Name)
182-
/p:VisualStudioIbcSourceBranchName=$(SourceBranch)
183-
/p:VisualStudioDropAccessToken=$(System.AccessToken)
184-
/p:VisualStudioDropName=$(VisualStudio.DropName)
185-
/p:DotNetSignType=$(SignType)
186-
/p:TeamName=MSBuild
187-
/p:DotNetPublishUsingPipelines=true
188-
/p:VisualStudioIbcDrop=$(OptProfDrop)
189-
/p:GenerateSbom=true
190-
/p:SuppressFinalPackageVersion=$(IsExperimental)
191-
displayName: Build
192-
condition: succeeded()
193-
194-
# Required by Microsoft policy
195-
- template: eng\common\templates-official\steps\generate-sbom.yml@self
196-
197-
# Publish OptProf configuration files
198-
- task: 1ES.PublishArtifactsDrop@1
199-
inputs:
200-
dropServiceURI: 'https://devdiv.artifacts.visualstudio.com'
201-
buildNumber: 'ProfilingInputs/DevDiv/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber)'
202-
sourcePath: '$(Build.SourcesDirectory)\artifacts\OptProf\$(BuildConfiguration)\Data'
203-
toLowerCase: false
204-
usePat: true
205-
displayName: 'OptProf - Publish to Artifact Services - ProfilingInputs'
206-
condition: and(succeeded(), ${{ parameters.EnableOptProf }})
207-
208-
# Build VS bootstrapper
209-
# Generates $(Build.StagingDirectory)\MicroBuild\Output\BootstrapperInfo.json
210-
- task: MicroBuildBuildVSBootstrapper@3
211-
inputs:
212-
vsMajorVersion: $(VisualStudio.MajorVersion)
213-
channelName: $(VisualStudio.ChannelName)
214-
manifests: $(VisualStudio.SetupManifestList)
215-
outputFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion'
216-
displayName: 'OptProf - Build VS bootstrapper'
217-
condition: and(succeeded(), ${{ parameters.EnableOptProf }})
218-
219-
# Publish run settings
220-
- task: PowerShell@2
221-
inputs:
222-
filePath: eng\common\sdk-task.ps1
223-
arguments: -configuration $(BuildConfiguration)
224-
-task VisualStudio.BuildIbcTrainingSettings
225-
/p:VisualStudioDropName=$(VisualStudio.DropName)
226-
/p:BootstrapperInfoPath=$(Build.StagingDirectory)\MicroBuild\Output\BootstrapperInfo.json
227-
/p:VisualStudioIbcTrainingSettingsPath=$(Build.SourcesDirectory)\eng\config\OptProf.runsettings
228-
displayName: 'OptProf - Build IBC training settings'
229-
condition: and(succeeded(), ${{ parameters.EnableOptProf }})
230-
231-
# Publish bootstrapper info
232-
- task: 1ES.PublishBuildArtifacts@1
233-
inputs:
234-
PathtoPublish: $(Build.StagingDirectory)\MicroBuild\Output
235-
ArtifactName: MicroBuildOutputs
236-
ArtifactType: Container
237-
displayName: 'OptProf - Publish Artifact: MicroBuildOutputs'
238-
condition: and(succeeded(), ${{ parameters.EnableOptProf }})
239-
240-
- task: 1ES.PublishBuildArtifacts@1
241-
displayName: 'Publish Artifact: logs'
242-
inputs:
243-
PathtoPublish: 'artifacts\log\$(BuildConfiguration)'
244-
ArtifactName: logs
245-
condition: succeededOrFailed()
246-
247-
# Publishes setup VSIXes to a drop.
248-
# Note: The insertion tool looks for the display name of this task in the logs.
249-
- task: 1ES.MicroBuildVstsDrop@1
250-
displayName: Upload VSTS Drop
251-
inputs:
252-
dropName: $(VisualStudio.DropName)
253-
dropFolder: 'artifacts\VSSetup\$(BuildConfiguration)\Insertion'
254-
dropRetentionDays: '30' # extended by insertion + VS release
255-
accessToken: '$(System.AccessToken)'
256-
dropServiceUri: 'https://devdiv.artifacts.visualstudio.com'
257-
vsDropServiceUri: 'https://vsdrop.corp.microsoft.com/file/v1'
258-
condition: succeeded()
259-
260-
# Publish an artifact that the RoslynInsertionTool is able to find by its name.
261-
- task: 1ES.PublishBuildArtifacts@1
262-
displayName: 'Publish Artifact: VSSetup'
263-
inputs:
264-
PathtoPublish: 'artifacts\VSSetup\$(BuildConfiguration)'
265-
ArtifactName: VSSetup
266-
condition: succeeded()
267-
268-
# Archive NuGet packages to DevOps.
269-
# Publish our NuPkgs as an artifact. The name of this artifact must be PackageArtifacts as the
270-
# arcade templates depend on the name.
271-
- task: 1ES.PublishBuildArtifacts@1
272-
displayName: 'Publish Artifact: packages'
273-
inputs:
274-
PathtoPublish: 'artifacts\packages\$(BuildConfiguration)'
275-
ArtifactName: PackageArtifacts
276-
condition: succeeded()
277-
278-
# Publish "IntelliSense" XSD files to their own artifact
279-
# so it can be consumed by the insertion-to-VS job
280-
- task: 1ES.PublishPipelineArtifact@1
281-
displayName: 'Publish Artifact: xsd'
282-
inputs:
283-
path: 'artifacts\xsd'
284-
artifactName: xsd
285-
condition: succeeded()
286-
287-
# Publish Asset Manifests for Build Asset Registry job
288-
- task: 1ES.PublishBuildArtifacts@1
289-
displayName: Publish Asset Manifests
290-
inputs:
291-
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/AssetManifest'
292-
ArtifactName: AssetManifests
293-
condition: succeeded()
294-
295-
# Tag the build at the very end when we know it's been successful.
296-
- task: colinsalmcorner.colinsalmcorner-buildtasks.tag-build-task.tagBuildOrRelease@0
297-
displayName: Tag build as ready for optimization training
298-
inputs:
299-
tags: 'ready-for-training'
300-
condition: and(succeeded(), ${{ parameters.EnableOptProf }})
301-
302-
- task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1
303-
displayName: Execute cleanup tasks
304-
condition: succeededOrFailed()
305-
306-
- template: /eng/common/templates-official/steps/component-governance.yml@self
307-
parameters:
308-
${{ if or(startsWith(variables['Build.SourceBranch'], 'refs/heads/vs'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}:
309-
disableComponentGovernance: false
310-
${{ else }}:
311-
disableComponentGovernance: true
312-
313-
- template: /eng/common/templates-official/jobs/source-build.yml@self
314-
parameters:
315-
platforms:
316-
- name: Managed
317-
pool:
318-
name: AzurePipelines-EO
319-
image: 1ESPT-Ubuntu22.04
320-
os: linux
321-
322-
- template: /eng/common/templates-official/job/publish-build-assets.yml@self
119+
- template: /azure-pipelines/.vsts-dotnet-build-jobs.yml@self
323120
parameters:
324-
enablePublishBuildArtifacts: true
325-
publishUsingPipelines: true
326-
dependsOn:
327-
- Windows_NT
328-
- Source_Build_Managed
329-
pool:
330-
name: $(DncEngInternalBuildPool)
331-
image: $(WindowsImage)
332-
os: windows
121+
isExperimental: false
122+
enableComponentGovernance: true
123+
enableOptProf: ${{ parameters.enableOptProf }}
333124

334-
- template: eng\common\templates-official\post-build\post-build.yml@self
125+
- template: /eng/common/templates-official/post-build/post-build.yml@self
335126
parameters:
336127
publishingInfraVersion: 3
337128
enableSymbolValidation: true
338129
enableSourceLinkValidation: false
339130
enableNugetValidation: false
131+
enableSigningValidation: ${{ parameters.enableSigningValidation }}
340132
SDLValidationParameters:
341133
enable: true
342134
continueOnError: false

0 commit comments

Comments
 (0)