From 56b61f1f312cd01d1937d54b7d687f01df4369d8 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Mon, 18 Jul 2022 16:36:51 -0400 Subject: [PATCH] [Localization] Add OneLocBuild job (#175) Context: https://aka.ms/OneLocBuild A new pipeline has been added in the DevDiv project which will run the `OneLocBuild@2` task on every commit to main. This task produces files needed by the localization team. For more details on this process, see the [OneLocBuild documentation][0] Onboarding for this repo is still pending, and a workflow for the "handback" of localized files will need to be established in a future PR once onboarding is complete. The new pipeline that runs the OneLocBuild task can be found at . [0]: https://aka.ms/OneLocBuild --- Localize/LocProject.json | 19 ++++++++++++++++ Localize/onelocbuild.yaml | 46 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 Localize/LocProject.json create mode 100644 Localize/onelocbuild.yaml diff --git a/Localize/LocProject.json b/Localize/LocProject.json new file mode 100644 index 0000000..688ef4e --- /dev/null +++ b/Localize/LocProject.json @@ -0,0 +1,19 @@ +{ + "Projects": [ + { + "LanguageSet": "VS_Main_Languages", + "LocItems": [ + { + "CopyOption": "LangIDOnName", + "SourceFile": ".\\src\\Microsoft.Android.Build.BaseTasks\\Properties\\Resources.resx", + "OutputPath": ".\\src\\Microsoft.Android.Build.BaseTasks\\Properties" + }, + { + "CopyOption": "LangIDOnName", + "SourceFile": ".\\src\\Xamarin.Android.Tools.AndroidSdk\\Properties\\Resources.resx", + "OutputPath": ".\\src\\Xamarin.Android.Tools.AndroidSdk\\Properties" + } + ] + } + ] +} diff --git a/Localize/onelocbuild.yaml b/Localize/onelocbuild.yaml new file mode 100644 index 0000000..2bd90ca --- /dev/null +++ b/Localize/onelocbuild.yaml @@ -0,0 +1,46 @@ +# xamarin-android-tools - OneLocBuild + +name: $(Build.SourceBranchName)-$(Build.SourceVersion)-$(Rev:r) + +trigger: +- main + +pr: none + +jobs: +- job: OneLocBuild + displayName: OneLocBuild + condition: and(eq(variables['System.TeamProject'], 'DevDiv'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + pool: VSEngSS-MicroBuild2022-1ES + timeoutInMinutes: 30 + variables: + - group: Xamarin-Secrets + workspace: + clean: all + steps: + - checkout: self + clean: true + + - task: OneLocBuild@2 + displayName: OneLocBuild + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + inputs: + locProj: Localize/LocProject.json + outDir: $(Build.StagingDirectory) + packageSourceAuth: patAuth + patVariable: $(OneLocBuild--PAT) + isCreatePrSelected: true + repoType: gitHub + gitHubPatVariable: $(github--pat--vs-mobiletools-engineering-service2) + prSourceBranchPrefix: locpr + isShouldReusePrSelected: true + isAutoCompletePrSelected: false + isUseLfLineEndingsSelected: true + + - task: PublishBuildArtifacts@1 + displayName: Publish Localization Files + inputs: + PathtoPublish: $(Build.StagingDirectory)/loc + ArtifactName: Loc + condition: succeededOrFailed()