1
1
parameters :
2
2
runAsPublic : false
3
- sourceIndexPackageVersion : 1.0.1-20230228.2
3
+ sourceIndexUploadPackageVersion : 2.0.0-20240502.12
4
+ sourceIndexProcessBinlogPackageVersion : 1.0.1-20240129.2
4
5
sourceIndexPackageSource : https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
5
6
sourceIndexBuildCommand : powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci"
6
7
preSteps : []
@@ -14,14 +15,14 @@ jobs:
14
15
dependsOn : ${{ parameters.dependsOn }}
15
16
condition : ${{ parameters.condition }}
16
17
variables :
17
- - name : SourceIndexPackageVersion
18
- value : ${{ parameters.sourceIndexPackageVersion }}
18
+ - name : SourceIndexUploadPackageVersion
19
+ value : ${{ parameters.sourceIndexUploadPackageVersion }}
20
+ - name : SourceIndexProcessBinlogPackageVersion
21
+ value : ${{ parameters.sourceIndexProcessBinlogPackageVersion }}
19
22
- name : SourceIndexPackageSource
20
23
value : ${{ parameters.sourceIndexPackageSource }}
21
24
- name : BinlogPath
22
25
value : ${{ parameters.binlogPath }}
23
- - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
24
- - group : source-dot-net stage1 variables
25
26
- template : /eng/common/templates-official/variables/pool-providers.yml
26
27
27
28
${{ if ne(parameters.pool, '') }} :
@@ -41,16 +42,16 @@ jobs:
41
42
- ${{ preStep }}
42
43
43
44
- task : UseDotNet@2
44
- displayName : Use .NET Core SDK 6
45
+ displayName : Use .NET 8 SDK
45
46
inputs :
46
47
packageType : sdk
47
- version : 6 .0.x
48
+ version : 8 .0.x
48
49
installationPath : $(Agent.TempDirectory)/dotnet
49
50
workingDirectory : $(Agent.TempDirectory)
50
51
51
52
- script : |
52
- $(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version $(SourceIndexPackageVersion ) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
53
- $(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version $(SourceIndexPackageVersion ) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
53
+ $(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version $(sourceIndexProcessBinlogPackageVersion ) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
54
+ $(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version $(sourceIndexUploadPackageVersion ) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
54
55
displayName: Download Tools
55
56
# Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk.
56
57
workingDirectory: $(Agent.TempDirectory)
62
63
displayName : Process Binlog into indexable sln
63
64
64
65
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
65
- - script : $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name)
66
+ - task : AzureCLI@2
67
+ displayName : Get stage 1 auth token
68
+ inputs :
69
+ azureSubscription : ' SourceDotNet Stage1 Publish'
70
+ addSpnToEnvironment : true
71
+ scriptType : ' ps'
72
+ scriptLocation : ' inlineScript'
73
+ inlineScript : |
74
+ echo "##vso[task.setvariable variable=ARM_CLIENT_ID;issecret=true]$env:servicePrincipalId"
75
+ echo "##vso[task.setvariable variable=ARM_ID_TOKEN;issecret=true]$env:idToken"
76
+ echo "##vso[task.setvariable variable=ARM_TENANT_ID;issecret=true]$env:tenantId"
77
+
78
+ - script : |
79
+ az login --service-principal -u $(ARM_CLIENT_ID) --tenant $(ARM_TENANT_ID) --allow-no-subscriptions --federated-token $(ARM_ID_TOKEN)
80
+ displayName: "Login to Azure"
81
+
82
+ - script : $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1
66
83
displayName : Upload stage1 artifacts to source index
67
- env :
68
- BLOB_CONTAINER_URL : $(source-dot-net-stage1-blob-container-url)
0 commit comments