Skip to content

Commit

Permalink
User/masudars/microsoft winget create azure pipelines loc migration t…
Browse files Browse the repository at this point in the history
…o 1 es (#471)
  • Loading branch information
Madhusudhan-MSFT authored Nov 9, 2023
1 parent 4212da3 commit 6b3324f
Showing 1 changed file with 50 additions and 31 deletions.
81 changes: 50 additions & 31 deletions pipelines/azure-pipelines.loc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,54 @@ pr: none

name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)

jobs:
- job: Localize
resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
pool:
vmImage: windows-latest
variables:
skipComponentGovernanceDetection: true
steps:
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@1
displayName: Send resources to Touchdown Build
inputs:
teamId: 25160
authId: cd9fc0c7-0aaa-461f-a098-6c97c3b1cfb1
authKey: $(LocServiceKey)
isPreview: false
relativePathRoot: src\WingetCreateCLI\Properties
resourceFilePath: "*.resx"
outputDirectoryRoot: Localization\Resources

- script: |
cd $(Build.SourcesDirectory)
git add -A
git diff --cached --exit-code
echo ##vso[task.setvariable variable=hasChanges]%errorlevel%
git diff --cached > $(Build.ArtifactStagingDirectory)\LocalizedStrings.patch
displayName: Check for changes and create patch file
- task: PublishPipelineArtifact@0
displayName: Publish patch file as artifact
condition: eq(variables['hasChanges'], '1')
inputs:
artifactName: Patch
targetPath: $(Build.ArtifactStagingDirectory)
name: Azure-Pipelines-1ESPT-ExDShared
image: windows-2022
os: windows
customBuildTags:
- ES365AIMigrationTooling

stages:
- stage: Localize
jobs:
- job: Localize
variables:
skipComponentGovernanceDetection: true
steps:
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@1
displayName: Send resources to Touchdown Build
inputs:
teamId: 25160
authId: cd9fc0c7-0aaa-461f-a098-6c97c3b1cfb1
authKey: $(LocServiceKey)
isPreview: false
relativePathRoot: src\WingetCreateCLI\Properties
resourceFilePath: "*.resx"
outputDirectoryRoot: Localization\Resources

- task: CmdLine@2
displayName: Check for changes and create patch file
inputs:
script: |
cd $(Build.SourcesDirectory)
git add -A
git diff --cached --exit-code
echo ##vso[task.setvariable variable=hasChanges]%errorlevel%
git diff --cached > $(Build.ArtifactStagingDirectory)\LocalizedStrings.patch
templateContext:
outputs:
- output: pipelineArtifact
displayName: 'Publish patch file as artifact'
condition: eq(variables['hasChanges'], '1')
artifactName: Patch
targetPath: $(Build.ArtifactStagingDirectory)

0 comments on commit 6b3324f

Please sign in to comment.