File tree 1 file changed +17
-1
lines changed
1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,22 @@ jobs:
173
173
- checkout : self
174
174
clean : true
175
175
176
+ # https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-security-configuration/configuration-guides/pat-burndown-guidance#authentication-from-pipelines
177
+ # Requires Azure client 2.x
178
+ - task : AzureCLI@2
179
+ displayName : ' Set AzDO.OneLocBuildToken'
180
+ enabled : true
181
+ inputs :
182
+ azureSubscription : ' VSEng-AzureDevOps-ceapex-OneLocBuild' # Azure DevOps service connection
183
+ scriptType : ' pscore'
184
+ scriptLocation : ' inlineScript'
185
+ inlineScript : |
186
+ # if this fails, check out this bash script that includes diagnostics:
187
+ # https://gist.github.com/johnterickson/19f80a3e969e39f1000d118739176e62
188
+ # Note that the resource is specified to limit the token to Azure DevOps
189
+ $token = az account get-access-token --query accessToken --resource 499b84ac-1321-427f-aa17-267ca6975798 -o tsv
190
+ Write-Host "##vso[task.setvariable variable=AzDO.OneLocBuildToken;issecret=true]${token}"
191
+
176
192
- task : OneLocBuild@2
177
193
displayName : OneLocBuild
178
194
env :
@@ -181,7 +197,7 @@ jobs:
181
197
locProj : Localize/LocProject.json
182
198
outDir : $(Build.StagingDirectory)
183
199
packageSourceAuth : patAuth
184
- patVariable : $(OneLocBuild--PAT )
200
+ patVariable : $(AzDO.OneLocBuildToken )
185
201
isCreatePrSelected : true
186
202
repoType : gitHub
187
203
gitHubPatVariable : $(github--pat--vs-mobiletools-engineering-service2)
You can’t perform that action at this time.
0 commit comments