Skip to content

Commit

Permalink
[Localization] Add OneLocBuild job (#175)
Browse files Browse the repository at this point in the history
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
<https://devdiv.visualstudio.com/DevDiv/_build?definitionId=16846>.

[0]: https://aka.ms/OneLocBuild
  • Loading branch information
pjcollins committed Jul 18, 2022
1 parent 14076a6 commit 56b61f1
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Localize/LocProject.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
]
}
46 changes: 46 additions & 0 deletions Localize/onelocbuild.yaml
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit 56b61f1

Please sign in to comment.