From e7e66c9a8c9be12a27e037f09a837ad90cb7d2a4 Mon Sep 17 00:00:00 2001 From: Madhusudhan Gumbalapura Sudarshan Date: Mon, 6 Nov 2023 16:12:01 -0800 Subject: [PATCH 1/2] [winget-create] winget-create azure-pipelines.loc migration to 1ESPipeline This PR migrates the following winget-create publish pipelines to 1ESPipeline. - azure-pipelines.loc.yml [Todo][How Validated:] - Initiate the pipeline manually from the topic branch that includes these changes and confirm that the pipeline functions as it did before. - Compare the artifacts generated by the pipeline before and after the migration to ensure that they match. --- pipelines/azure-pipelines.loc.yml | 81 +++++++++++++++++++------------ 1 file changed, 50 insertions(+), 31 deletions(-) diff --git a/pipelines/azure-pipelines.loc.yml b/pipelines/azure-pipelines.loc.yml index 33ff0429..a86f0881 100644 --- a/pipelines/azure-pipelines.loc.yml +++ b/pipelines/azure-pipelines.loc.yml @@ -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) From 72167055d456fb76a173e97cb4bcfa805c31a2a3 Mon Sep 17 00:00:00 2001 From: Madhusudhan Gumbalapura Sudarshan Date: Mon, 6 Nov 2023 16:17:27 -0800 Subject: [PATCH 2/2] Fix steps section alignment issue --- pipelines/azure-pipelines.loc.yml | 52 +++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/pipelines/azure-pipelines.loc.yml b/pipelines/azure-pipelines.loc.yml index a86f0881..0ff73c55 100644 --- a/pipelines/azure-pipelines.loc.yml +++ b/pipelines/azure-pipelines.loc.yml @@ -43,31 +43,31 @@ extends: 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: 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 + - 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) + templateContext: + outputs: + - output: pipelineArtifact + displayName: 'Publish patch file as artifact' + condition: eq(variables['hasChanges'], '1') + artifactName: Patch + targetPath: $(Build.ArtifactStagingDirectory)