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.
|
# resources to run.
|
||||||
#
|
#
|
||||||
|
|
||||||
# Expects a variable called LocServiceKey to contain the OAuth client secret for Touchdown.
|
|
||||||
|
|
||||||
schedules:
|
schedules:
|
||||||
- cron: "0 5 * * *"
|
- cron: "0 5 * * *"
|
||||||
displayName: Daily sync
|
displayName: Daily sync
|
||||||
|
@ -20,6 +18,9 @@ pr: none
|
||||||
|
|
||||||
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
|
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
|
||||||
|
|
||||||
|
variables:
|
||||||
|
isMainBranch: ${{ eq(variables['Build.SourceBranch'], 'refs/heads/main') }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- job: Localize
|
- job: Localize
|
||||||
pool:
|
pool:
|
||||||
|
@ -30,15 +31,18 @@ jobs:
|
||||||
- checkout: self
|
- checkout: self
|
||||||
clean: true
|
clean: true
|
||||||
|
|
||||||
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@2
|
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@4
|
||||||
displayName: Send resources to Touchdown Build
|
displayName: Send resources to Touchdown Build
|
||||||
inputs:
|
inputs:
|
||||||
teamId: 86
|
teamId: 86
|
||||||
TDBuildServiceConnection: EE-TDBuild-Localization
|
authType: FederatedIdentity
|
||||||
|
FederatedIdentityServiceConnection: EE-TDBuild-Localization-FC
|
||||||
isPreview: false
|
isPreview: false
|
||||||
relativePathRoot: src/Calculator/Resources/en-US/
|
relativePathRoot: src/Calculator/Resources/en-US/
|
||||||
resourceFilePath: '*.resw'
|
resourceFilePath: '*.resw'
|
||||||
outputDirectoryRoot: src/Calculator/Resources/
|
outputDirectoryRoot: src/Calculator/Resources/
|
||||||
|
${{ if eq(variables['isMainBranch'], false) }}:
|
||||||
|
localizationTarget: false
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
cd $(Build.SourcesDirectory)
|
cd $(Build.SourcesDirectory)
|
||||||
|
@ -50,7 +54,7 @@ jobs:
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@0
|
- task: PublishPipelineArtifact@0
|
||||||
displayName: Publish patch file as artifact
|
displayName: Publish patch file as artifact
|
||||||
condition: eq(variables['hasChanges'], '1')
|
condition: and(eq(variables['hasChanges'], '1'), eq(variables['isMainBranch'], true))
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: Patch
|
artifactName: Patch
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
targetPath: $(Build.ArtifactStagingDirectory)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue