@@ -343,7 +343,10 @@ extends:
343
343
jobs :
344
344
- job : OneLocBuild
345
345
displayName : OneLocBuild
346
- pool : $(MicroBuildPoolName)
346
+ pool :
347
+ name : AzurePipelines-EO
348
+ demands :
349
+ - ImageOverride -equals 1ESPT-Windows2022
347
350
timeoutInMinutes : 30
348
351
variables :
349
352
- group : Xamarin-Secrets
@@ -360,6 +363,22 @@ extends:
360
363
- checkout : self
361
364
clean : true
362
365
366
+ # 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
367
+ # Requires Azure client 2.x
368
+ - task : AzureCLI@2
369
+ displayName : ' Set AzDO.OneLocBuildToken'
370
+ enabled : true
371
+ inputs :
372
+ azureSubscription : ' VSEng-AzureDevOps-ceapex-OneLocBuild' # Azure DevOps service connection
373
+ scriptType : ' pscore'
374
+ scriptLocation : ' inlineScript'
375
+ inlineScript : |
376
+ # if this fails, check out this bash script that includes diagnostics:
377
+ # https://gist.github.com/johnterickson/19f80a3e969e39f1000d118739176e62
378
+ # Note that the resource is specified to limit the token to Azure DevOps
379
+ $token = az account get-access-token --query accessToken --resource 499b84ac-1321-427f-aa17-267ca6975798 -o tsv
380
+ Write-Host "##vso[task.setvariable variable=AzDO.OneLocBuildToken;issecret=true]${token}"
381
+
363
382
- task : OneLocBuild@2
364
383
displayName : OneLocBuild
365
384
env :
@@ -368,7 +387,7 @@ extends:
368
387
locProj : Localize/LocProject.json
369
388
outDir : $(Build.StagingDirectory)
370
389
packageSourceAuth : patAuth
371
- patVariable : $(OneLocBuild--PAT )
390
+ patVariable : $(AzDO.OneLocBuildToken )
372
391
isCreatePrSelected : true
373
392
repoType : gitHub
374
393
gitHubPatVariable : $(github--pat--vs-mobiletools-engineering-service2)
0 commit comments