File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 3333 - checkout : self
3434 clean : true
3535
36+ # 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
37+ # Requires Azure client 2.x
38+ - task : AzureCLI@2
39+ displayName : ' Set AzDO.OneLocBuildToken'
40+ enabled : true
41+ inputs :
42+ azureSubscription : ' VSEng-AzureDevOps-ceapex-OneLocBuild' # Azure DevOps service connection
43+ scriptType : ' pscore'
44+ scriptLocation : ' inlineScript'
45+ inlineScript : |
46+ # if this fails, check out this bash script that includes diagnostics:
47+ # https://gist.github.com/johnterickson/19f80a3e969e39f1000d118739176e62
48+ # Note that the resource is specified to limit the token to Azure DevOps
49+ $token = az account get-access-token --query accessToken --resource 499b84ac-1321-427f-aa17-267ca6975798 -o tsv
50+ Write-Host "##vso[task.setvariable variable=AzDO.OneLocBuildToken;issecret=true]${token}"
51+
3652 - task : OneLocBuild@2
3753 displayName : OneLocBuild
3854 env :
4157 locProj : Localize/LocProject.json
4258 outDir : $(Build.StagingDirectory)
4359 packageSourceAuth : patAuth
44- patVariable : $(OneLocBuild--PAT )
60+ patVariable : $(AzDO.OneLocBuildToken )
4561 isCreatePrSelected : true
4662 repoType : gitHub
4763 gitHubPatVariable : $(github--pat--vs-mobiletools-engineering-service2)
You can’t perform that action at this time.
0 commit comments