mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-20 21:33:10 -07:00
Use authentication with FC for localization pipeline (#2192)
* use fc * only create patch on main
This commit is contained in:
parent
82b8ffa4d7
commit
c1448db9d3
1 changed files with 10 additions and 6 deletions
|
@ -5,8 +5,6 @@
|
|||
# resources to run.
|
||||
#
|
||||
|
||||
# Expects a variable called LocServiceKey to contain the OAuth client secret for Touchdown.
|
||||
|
||||
schedules:
|
||||
- cron: "0 5 * * *"
|
||||
displayName: Daily sync
|
||||
|
@ -20,6 +18,9 @@ pr: none
|
|||
|
||||
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
|
||||
|
||||
variables:
|
||||
isMainBranch: ${{ eq(variables['Build.SourceBranch'], 'refs/heads/main') }}
|
||||
|
||||
jobs:
|
||||
- job: Localize
|
||||
pool:
|
||||
|
@ -30,15 +31,18 @@ jobs:
|
|||
- checkout: self
|
||||
clean: true
|
||||
|
||||
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@2
|
||||
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@4
|
||||
displayName: Send resources to Touchdown Build
|
||||
inputs:
|
||||
teamId: 86
|
||||
TDBuildServiceConnection: EE-TDBuild-Localization
|
||||
authType: FederatedIdentity
|
||||
FederatedIdentityServiceConnection: EE-TDBuild-Localization-FC
|
||||
isPreview: false
|
||||
relativePathRoot: src/Calculator/Resources/en-US/
|
||||
resourceFilePath: '*.resw'
|
||||
outputDirectoryRoot: src/Calculator/Resources/
|
||||
${{ if eq(variables['isMainBranch'], false) }}:
|
||||
localizationTarget: false
|
||||
|
||||
- script: |
|
||||
cd $(Build.SourcesDirectory)
|
||||
|
@ -50,7 +54,7 @@ jobs:
|
|||
|
||||
- task: PublishPipelineArtifact@0
|
||||
displayName: Publish patch file as artifact
|
||||
condition: eq(variables['hasChanges'], '1')
|
||||
condition: and(eq(variables['hasChanges'], '1'), eq(variables['isMainBranch'], true))
|
||||
inputs:
|
||||
artifactName: Patch
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue