1
1
parameters :
2
2
runAsPublic : false
3
- sourceIndexPackageVersion : 1.0.1-20240129.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 : []
@@ -15,14 +16,14 @@ jobs:
15
16
dependsOn : ${{ parameters.dependsOn }}
16
17
condition : ${{ parameters.condition }}
17
18
variables :
18
- - name : SourceIndexPackageVersion
19
- value : ${{ parameters.sourceIndexPackageVersion }}
19
+ - name : SourceIndexUploadPackageVersion
20
+ value : ${{ parameters.sourceIndexUploadPackageVersion }}
21
+ - name : SourceIndexProcessBinlogPackageVersion
22
+ value : ${{ parameters.sourceIndexProcessBinlogPackageVersion }}
20
23
- name : SourceIndexPackageSource
21
24
value : ${{ parameters.sourceIndexPackageSource }}
22
25
- name : BinlogPath
23
26
value : ${{ parameters.binlogPath }}
24
- - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
25
- - group : source-dot-net stage1 variables
26
27
- template : /eng/common/core-templates/variables/pool-providers.yml
27
28
parameters :
28
29
is1ESPipeline : ${{ parameters.is1ESPipeline }}
54
55
workingDirectory : $(Agent.TempDirectory)
55
56
56
57
- script : |
57
- $(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version $(SourceIndexPackageVersion ) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
58
- $(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version $(SourceIndexPackageVersion ) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
58
+ $(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version $(sourceIndexProcessBinlogPackageVersion ) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
59
+ $(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version $(sourceIndexUploadPackageVersion ) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
59
60
displayName: Download Tools
60
61
# Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk.
61
62
workingDirectory: $(Agent.TempDirectory)
67
68
displayName : Process Binlog into indexable sln
68
69
69
70
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
70
- - script : $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name)
71
- displayName : Upload stage1 artifacts to source index
72
- env :
73
- BLOB_CONTAINER_URL : $(source-dot-net-stage1-blob-container-url)
71
+ - task : AzureCLI@2
72
+ displayName : Get stage 1 auth token
73
+ inputs :
74
+ azureSubscription : ' SourceDotNet Stage1 Publish'
75
+ addSpnToEnvironment : true
76
+ scriptType : ' ps'
77
+ scriptLocation : ' inlineScript'
78
+ inlineScript : |
79
+ echo "##vso[task.setvariable variable=ARM_CLIENT_ID]$env:servicePrincipalId"
80
+ echo "##vso[task.setvariable variable=ARM_ID_TOKEN]$env:idToken"
81
+ echo "##vso[task.setvariable variable=ARM_TENANT_ID]$env:tenantId"
82
+
83
+ - script : |
84
+ echo "Client ID: $(ARM_CLIENT_ID)"
85
+ echo "ID Token: $(ARM_ID_TOKEN)"
86
+ echo "Tenant ID: $(ARM_TENANT_ID)"
87
+ az login --service-principal -u $(ARM_CLIENT_ID) --tenant $(ARM_TENANT_ID) --allow-no-subscriptions --federated-token $(ARM_ID_TOKEN)
88
+ displayName: "Login to Azure"
89
+
90
+ - script : $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1
91
+ displayName : Upload stage1 artifacts to source index
0 commit comments