@@ -20,67 +20,76 @@ parameters:
2020 type : boolean
2121 default : true
2222
23+ resources :
24+ repositories :
25+ - repository : 1ESPipelineTemplates
26+ type : git
27+ name : 1ESPipelineTemplates/1ESPipelineTemplates
28+ ref : refs/tags/release
29+
2330variables :
2431# Variable group contains the PAT to LOC
2532- group : OneLocBuildVariables
2633
27- stages :
28- - stage : LocalizationStage
29- condition : eq(variables['Build.SourceBranch'], 'refs/heads/main')
30- jobs :
31- - job : Localization
34+ extends :
35+ template : v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
36+ parameters :
3237 pool :
33- name : NetCore1ESPool-Internal
34- demands : ImageOverride -equals windows.vs2022preview.amd64
35- steps :
36- - task : NodeTool@0
37- displayName : ' Install Node.js 18.x'
38- inputs :
39- # Octokit client needs 18.x to have 'fetch' function.
40- versionSpec : ' 18.x'
41- - checkout : self
42- clean : true
43- submodules : true
44- fetchTags : false
45- fetchDepth : 0
46- - pwsh : |
47- npm install
48- npm install -g gulp
49- displayName: 'Install tools'
50- - pwsh : npm run compile
51- displayName : ' Compile'
52- - pwsh : npm run l10nDevGenerateLocalizationBundle
53- displayName : ' Generate bundle.l10.json'
54- - pwsh : npm run l10nDevGenerateXlf
55- displayName : ' Generate xlf files from bundle.10n.json'
56- - task : OneLocBuild@2
57- env :
58- SYSTEM_ACCESSTOKEN : $(System.AccessToken)
59- inputs :
60- locProj : loc/LocProject.json
61- outDir : ' $(Build.SourcesDirectory)/loc'
62- isCreatePrSelected : false
63- patVariable : $(dn-bot-ceapex-package-r)
64- packageSourceAuth : patAuth
65- lclSource : lclFilesfromPackage
66- LclPackageId : ' LCL-JUNO-PROD-VSCODECS'
67- - pwsh : npm run l10nDevImportXlf
68- displayName : ' Import xlf to json.'
69- -
pwsh :
gulp 'publish localization content' --userName dotnet-bot --email [email protected] --commitSha $(Build.SourceVersion) --targetRemoteRepo vscode-csharp --baseBranch 'main' 70- displayName : ' Create PR in GitHub.'
71- env :
72- GitHubPAT : $(BotAccount-dotnet-bot-repo-PAT)
73- - task : PublishBuildArtifacts@1
74- displayName : ' Publish Localization Files'
75- inputs :
76- PathtoPublish : ' $(Build.SourcesDirectory)/loc'
77- PublishLocation : Container
78- ArtifactName : Loc
79- condition : ${{ parameters.publishLocalizationFile }}
80- - task : PublishBuildArtifacts@1
81- displayName : ' Publish l10n file'
82- inputs :
83- PathtoPublish : ' $(Build.SourcesDirectory)/l10n'
84- PublishLocation : Container
85- ArtifactName : l10n
86- condition : ${{ parameters.publishLocalizationFile }}
38+ name : NetCore1ESPool-Svc-Internal
39+ image : 1es-windows-2022-pt
40+ os : windows
41+ stages :
42+ - stage : LocalizationStage
43+ condition : eq(variables['Build.SourceBranch'], 'refs/heads/main')
44+ jobs :
45+ - job : Localization
46+ templateContext :
47+ outputs :
48+ - output : pipelineArtifact
49+ displayName : LOC
50+ targetPath : ' $(Build.SourcesDirectory)/loc'
51+ condition : ${{ parameters.publishLocalizationFile }}
52+ artifactName : loc
53+ - output : pipelineArtifact
54+ displayName : l10n
55+ targetPath : ' $(Build.SourcesDirectory)/l10n'
56+ condition : ${{ parameters.publishLocalizationFile }}
57+ artifactName : l10n
58+ steps :
59+ - task : NodeTool@0
60+ displayName : ' Install Node.js 18.x'
61+ inputs :
62+ # Octokit client needs 18.x to have 'fetch' function.
63+ versionSpec : ' 18.x'
64+ - checkout : self
65+ clean : true
66+ submodules : true
67+ fetchTags : false
68+ fetchDepth : 0
69+ - pwsh : |
70+ npm install
71+ npm install -g gulp
72+ displayName: 'Install tools'
73+ - pwsh : npm run compile
74+ displayName : ' Compile'
75+ - pwsh : npm run l10nDevGenerateLocalizationBundle
76+ displayName : ' Generate bundle.l10.json'
77+ - pwsh : npm run l10nDevGenerateXlf
78+ displayName : ' Generate xlf files from bundle.10n.json'
79+ - task : OneLocBuild@2
80+ env :
81+ SYSTEM_ACCESSTOKEN : $(System.AccessToken)
82+ inputs :
83+ locProj : loc/LocProject.json
84+ outDir : ' $(Build.SourcesDirectory)/loc'
85+ isCreatePrSelected : false
86+ patVariable : $(dn-bot-ceapex-package-r)
87+ packageSourceAuth : patAuth
88+ lclSource : lclFilesfromPackage
89+ LclPackageId : ' LCL-JUNO-PROD-VSCODECS'
90+ - pwsh : npm run l10nDevImportXlf
91+ displayName : ' Import xlf to json.'
92+ -
pwsh :
gulp 'publish localization content' --userName dotnet-bot --email [email protected] --commitSha $(Build.SourceVersion) --targetRemoteRepo vscode-csharp --baseBranch 'main' 93+ displayName : ' Create PR in GitHub.'
94+ env :
95+ GitHubPAT : $(BotAccount-dotnet-bot-repo-PAT)
0 commit comments