From 94e1c7e6d99891983852412a0e72dabcc628e467 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Wed, 20 Jul 2022 12:48:16 -0400 Subject: [PATCH] [Localization] Add OneLocBuild job A new job has been added to 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 automatic "handback" of localized files will need to be established in a future PR once onboarding is complete. [0]: https://aka.ms/OneLocBuild --- Localize/LocProject.json | 19 +++++++++ build-tools/automation/azure-pipelines.yaml | 46 +++++++++++++++++++-- 2 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 Localize/LocProject.json diff --git a/Localize/LocProject.json b/Localize/LocProject.json new file mode 100644 index 00000000000..3f8134c439a --- /dev/null +++ b/Localize/LocProject.json @@ -0,0 +1,19 @@ +{ + "Projects": [ + { + "LanguageSet": "VS_Main_Languages", + "LocItems": [ + { + "CopyOption": "LangIDOnName", + "SourceFile": ".\\src\\Microsoft.Android.Sdk.ILLink\\Properties\\Resources.resx", + "OutputPath": ".\\src\\Microsoft.Android.Sdk.ILLink\\Properties\\" + }, + { + "CopyOption": "LangIDOnName", + "SourceFile": ".\\src\\Xamarin.Android.Build.Tasks\\Properties\\Resources.resx", + "OutputPath": ".\\src\\Xamarin.Android.Build.Tasks\\Properties\\" + }, + ] + } + ] +} diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index 979f6e1b52e..2e088650a5e 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -1825,13 +1825,13 @@ stages: packageFilter: '*.nupkg;*.msi;*.pkg;*.vsix' GitHub.Token: $(GitHub.Token) -- stage: code_analysis +- stage: tenets dependsOn: [] - displayName: Code Analysis + displayName: Tenets jobs: - # Check - "Xamarin.Android (Code Analysis Security and Compliance)" + # Check - "Xamarin.Android (Tenets Code Analysis)" - job: run_static_analysis - displayName: Security and Compliance + displayName: Code Analysis pool: vmImage: $(HostedWinImage) timeoutInMinutes: 60 @@ -1876,3 +1876,41 @@ stages: CredScan: true PoliCheck: true condition: succeededOrFailed() + + # Check - "Xamarin.Android (Tenets OneLocBuild)" + - job: OneLocBuild + displayName: OneLocBuild + condition: eq(variables['MicroBuildSignType'], 'Real') + 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()