11parameters :
22 runAsPublic : false
3+ sourceIndexUploadPackageVersion : 2.0.0-20240522.1
4+ sourceIndexProcessBinlogPackageVersion : 1.0.1-20240522.1
5+ sourceIndexPackageSource : https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
36 sourceIndexBuildCommand : powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci"
47 preSteps : []
58 binlogPath : artifacts/log/Debug/Build.binlog
1316 dependsOn : ${{ parameters.dependsOn }}
1417 condition : ${{ parameters.condition }}
1518 variables :
19+ - name : SourceIndexUploadPackageVersion
20+ value : ${{ parameters.sourceIndexUploadPackageVersion }}
21+ - name : SourceIndexProcessBinlogPackageVersion
22+ value : ${{ parameters.sourceIndexProcessBinlogPackageVersion }}
23+ - name : SourceIndexPackageSource
24+ value : ${{ parameters.sourceIndexPackageSource }}
1625 - name : BinlogPath
1726 value : ${{ parameters.binlogPath }}
1827 - template : /eng/common/core-templates/variables/pool-providers.yml
@@ -25,20 +34,48 @@ jobs:
2534 pool :
2635 ${{ if eq(variables['System.TeamProject'], 'public') }} :
2736 name : $(DncEngPublicBuildPool)
28- image : windows.vs2022.amd64.open
37+ image : 1es-windows-2022-open
38+ os : windows
2939 ${{ if eq(variables['System.TeamProject'], 'internal') }} :
3040 name : $(DncEngInternalBuildPool)
31- image : windows.vs2022.amd64
41+ image : 1es-windows-2022
42+ os : windows
3243
3344 steps :
3445 - ${{ if eq(parameters.is1ESPipeline, '') }} :
3546 - ' Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder. ' : error
3647
3748 - ${{ each preStep in parameters.preSteps }} :
3849 - ${{ preStep }}
50+
51+ - task : UseDotNet@2
52+ displayName : Use .NET 8 SDK
53+ inputs :
54+ packageType : sdk
55+ version : 8.0.x
56+ installationPath : $(Agent.TempDirectory)/dotnet
57+ workingDirectory : $(Agent.TempDirectory)
58+
59+ - script : |
60+ $(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version $(sourceIndexProcessBinlogPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
61+ $(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version $(sourceIndexUploadPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
62+ displayName: Download Tools
63+ # Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk.
64+ workingDirectory: $(Agent.TempDirectory)
65+
3966 - script : ${{ parameters.sourceIndexBuildCommand }}
4067 displayName : Build Repository
4168
42- - template : /eng/common/core-templates/steps/source-index-stage1-publish.yml
43- parameters :
44- binLogPath : ${{ parameters.binLogPath }}
69+ - script : $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i $(BinlogPath) -r $(Build.SourcesDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output
70+ displayName : Process Binlog into indexable sln
71+
72+ - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
73+ - task : AzureCLI@2
74+ displayName : Log in to Azure and upload stage1 artifacts to source index
75+ inputs :
76+ azureSubscription : ' SourceDotNet Stage1 Publish'
77+ addSpnToEnvironment : true
78+ scriptType : ' ps'
79+ scriptLocation : ' inlineScript'
80+ inlineScript : |
81+ $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1
0 commit comments