azure-pipelines.loc.yml (2146B)
1 # 2 # Localization 3 # This pipeline uploads English strings files to the localization service, downloads any translated 4 # files which are available, and checks them into git. This pipeline relies on Microsoft-internal 5 # resources to run. 6 # 7 8 # Expects a variable called LocServiceKey to contain the OAuth client secret for Touchdown. 9 10 trigger: none 11 pr: none 12 13 name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr) 14 15 jobs: 16 - job: Localize 17 pool: 18 vmImage: windows-latest 19 variables: 20 skipComponentGovernanceDetection: true 21 tdbuildTeamId: 8343 22 steps: 23 # Upload client resources 24 - task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@5 25 displayName: Send resources to Touchdown Build 26 inputs: 27 teamId: $(tdbuildTeamId) 28 authType: FederatedIdentity 29 FederatedIdentityServiceConnection: AppInstallerTDBuild 30 isPreview: false 31 relativePathRoot: src\AppInstallerCLIPackage\Shared\Strings\en-us 32 resourceFilePath: '*.resw' 33 outputDirectoryRoot: localization/Resources/ 34 35 # Upload Group Policy ADML 36 # Do it as a separate step as we need the result in a different location 37 - task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@5 38 displayName: Send ADML to Touchdown Build 39 inputs: 40 teamId: $(tdbuildTeamId) 41 authType: FederatedIdentity 42 FederatedIdentityServiceConnection: AppInstallerTDBuild 43 isPreview: false 44 relativePathRoot: doc\admx\en-US 45 resourceFilePath: '*.adml' 46 outputDirectoryRoot: Localization\Policies\ 47 48 - script: | 49 cd $(Build.SourcesDirectory) 50 git add -A 51 git diff --cached --exit-code 52 echo ##vso[task.setvariable variable=hasChanges]%errorlevel% 53 git diff --cached > $(Build.ArtifactStagingDirectory)\LocalizedStrings.patch 54 displayName: Check for changes and create patch file 55 56 - task: PublishPipelineArtifact@0 57 displayName: Publish patch file as artifact 58 condition: eq(variables['hasChanges'], '1') 59 inputs: 60 artifactName: Patch 61 targetPath: $(Build.ArtifactStagingDirectory)