2021-03-18 13:00:01 +00:00
|
|
|
parameters:
|
|
|
|
# Optional: dependencies of the job
|
|
|
|
dependsOn: ''
|
|
|
|
|
|
|
|
# Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
|
|
|
|
pool:
|
2021-11-10 23:16:51 +00:00
|
|
|
vmImage: windows-2019
|
2021-03-18 13:00:01 +00:00
|
|
|
|
|
|
|
CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex
|
|
|
|
GithubPat: $(BotAccount-dotnet-bot-repo-PAT)
|
|
|
|
|
|
|
|
SourcesDirectory: $(Build.SourcesDirectory)
|
|
|
|
CreatePr: true
|
2021-04-15 13:14:27 +00:00
|
|
|
AutoCompletePr: false
|
2021-12-14 19:34:03 +00:00
|
|
|
ReusePr: true
|
2021-05-05 13:06:29 +00:00
|
|
|
UseLfLineEndings: true
|
2021-03-18 13:00:01 +00:00
|
|
|
UseCheckedInLocProjectJson: false
|
|
|
|
LanguageSet: VS_Main_Languages
|
|
|
|
LclSource: lclFilesInRepo
|
|
|
|
LclPackageId: ''
|
|
|
|
RepoType: gitHub
|
2021-06-12 12:58:31 +00:00
|
|
|
GitHubOrg: dotnet
|
|
|
|
MirrorRepo: ''
|
|
|
|
MirrorBranch: main
|
2021-04-29 13:14:01 +00:00
|
|
|
condition: ''
|
2021-03-18 13:00:01 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: OneLocBuild
|
|
|
|
|
|
|
|
dependsOn: ${{ parameters.dependsOn }}
|
|
|
|
|
|
|
|
displayName: OneLocBuild
|
|
|
|
|
|
|
|
pool: ${{ parameters.pool }}
|
|
|
|
|
|
|
|
variables:
|
|
|
|
- group: OneLocBuildVariables # Contains the CeapexPat and GithubPat
|
|
|
|
- name: _GenerateLocProjectArguments
|
|
|
|
value: -SourcesDirectory ${{ parameters.SourcesDirectory }}
|
|
|
|
-LanguageSet "${{ parameters.LanguageSet }}"
|
|
|
|
-CreateNeutralXlfs
|
|
|
|
- ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}:
|
|
|
|
- name: _GenerateLocProjectArguments
|
|
|
|
value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: Powershell@2
|
|
|
|
inputs:
|
|
|
|
filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1
|
|
|
|
arguments: $(_GenerateLocProjectArguments)
|
|
|
|
displayName: Generate LocProject.json
|
2021-04-29 13:14:01 +00:00
|
|
|
condition: ${{ parameters.condition }}
|
2021-03-18 13:00:01 +00:00
|
|
|
|
|
|
|
- task: OneLocBuild@2
|
|
|
|
displayName: OneLocBuild
|
2021-03-26 13:54:15 +00:00
|
|
|
env:
|
|
|
|
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
2021-03-18 13:00:01 +00:00
|
|
|
inputs:
|
2021-05-22 12:59:44 +00:00
|
|
|
locProj: eng/Localize/LocProject.json
|
2021-03-18 13:00:01 +00:00
|
|
|
outDir: $(Build.ArtifactStagingDirectory)
|
|
|
|
lclSource: ${{ parameters.LclSource }}
|
|
|
|
lclPackageId: ${{ parameters.LclPackageId }}
|
|
|
|
isCreatePrSelected: ${{ parameters.CreatePr }}
|
2021-04-15 13:14:27 +00:00
|
|
|
${{ if eq(parameters.CreatePr, true) }}:
|
|
|
|
isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }}
|
2021-05-05 13:06:29 +00:00
|
|
|
isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }}
|
2021-12-14 19:34:03 +00:00
|
|
|
${{ if eq(parameters.RepoType, 'gitHub') }}:
|
|
|
|
isShouldReusePrSelected: ${{ parameters.ReusePr }}
|
2021-03-18 13:00:01 +00:00
|
|
|
packageSourceAuth: patAuth
|
|
|
|
patVariable: ${{ parameters.CeapexPat }}
|
2021-03-26 13:54:15 +00:00
|
|
|
${{ if eq(parameters.RepoType, 'gitHub') }}:
|
|
|
|
repoType: ${{ parameters.RepoType }}
|
|
|
|
gitHubPatVariable: "${{ parameters.GithubPat }}"
|
2021-06-12 12:58:31 +00:00
|
|
|
${{ if ne(parameters.MirrorRepo, '') }}:
|
|
|
|
isMirrorRepoSelected: true
|
|
|
|
gitHubOrganization: ${{ parameters.GitHubOrg }}
|
|
|
|
mirrorRepo: ${{ parameters.MirrorRepo }}
|
|
|
|
mirrorBranch: ${{ parameters.MirrorBranch }}
|
2021-04-29 13:14:01 +00:00
|
|
|
condition: ${{ parameters.condition }}
|
2021-03-18 13:00:01 +00:00
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish Localization Files
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)/loc'
|
|
|
|
PublishLocation: Container
|
|
|
|
ArtifactName: Loc
|
2021-04-29 13:14:01 +00:00
|
|
|
condition: ${{ parameters.condition }}
|
2021-03-18 13:00:01 +00:00
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish LocProject.json
|
|
|
|
inputs:
|
2021-05-22 12:59:44 +00:00
|
|
|
PathtoPublish: '$(Build.SourcesDirectory)/eng/Localize/'
|
2021-03-18 13:00:01 +00:00
|
|
|
PublishLocation: Container
|
|
|
|
ArtifactName: Loc
|
2021-04-29 13:14:01 +00:00
|
|
|
condition: ${{ parameters.condition }}
|