Skip to content

Commit

Permalink
Update OneLocBuild process (#3912)
Browse files Browse the repository at this point in the history
* try service connection already there

* use variables
  • Loading branch information
gcampbell-msft authored Jul 18, 2024
1 parent e27b57a commit 5db0a3d
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion jobs/loc/TranslationsImportExport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,19 @@ extends:
- task: CmdLine@2
inputs:
script: 'yarn run translations-export'

# 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
# Requires Azure client 2.x
- task: AzureCLI@2
displayName: 'Set OneLocBuildToken'
enabled: true
inputs:
azureSubscription: '$(AzureSubscription)' # Azure DevOps service connection
scriptType: 'pscore'
scriptLocation: 'inlineScript'
inlineScript: |
$token = az account get-access-token --query accessToken --resource $(AzureGuid) -o tsv
Write-Host "##vso[task.setvariable variable=AzDO.OneLocBuildToken;issecret=true]${token}"
- task: OneLocBuild@2
env:
Expand All @@ -68,7 +81,7 @@ extends:
isCreatePrSelected: false
prSourceBranchPrefix: 'locfiles'
packageSourceAuth: 'patAuth'
patVariable: '$(OneLocBuildPat)'
patVariable: '$(AzDO.OneLocBuildToken)'
LclSource: lclFilesfromPackage
LclPackageId: 'LCL-JUNO-PROD-VCMAKE'
lsBuildXLocPackageVersion: '7.0.30510'
Expand Down

0 comments on commit 5db0a3d

Please sign in to comment.