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
|
2022-02-03 17:55:02 +00:00
|
|
|
pool: ''
|
|
|
|
|
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:55:22 +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
|
|
|
|
|
2022-02-03 17:55:02 +00:00
|
|
|
${{ if ne(parameters.pool, '') }}:
|
|
|
|
pool: ${{ parameters.pool }}
|
|
|
|
${{ if eq(parameters.pool, '') }}:
|
|
|
|
pool:
|
|
|
|
# We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
|
|
|
|
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
|
|
|
|
name: VSEngSS-MicroBuild2022-1ES
|
|
|
|
demands: Cmd
|
|
|
|
# If it's not devdiv, it's dnceng
|
|
|
|
${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
|
2022-09-14 21:36:42 +00:00
|
|
|
name: NetCore1ESPool-Svc-Internal
|
2022-08-12 17:01:46 +00:00
|
|
|
demands: ImageOverride -equals windows.vs2019.amd64
|
2021-03-18 13:00:01 +00:00
|
|
|
|
|
|
|
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:55:22 +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 }}
|