Skip to content

Commit 5fded90

Browse files
committed
Initial change
1 parent 1e7e836 commit 5fded90

File tree

1 file changed

+67
-59
lines changed

1 file changed

+67
-59
lines changed

azure-pipelines/loc.yml

Lines changed: 67 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -20,67 +20,75 @@ parameters:
2020
type: boolean
2121
default: true
2222

23+
repositories:
24+
- repository: 1ESPipelineTemplates
25+
type: git
26+
name: 1ESPipelineTemplates/1ESPipelineTemplates
27+
ref: refs/tags/release
28+
2329
variables:
2430
# Variable group contains the PAT to LOC
2531
- group: OneLocBuildVariables
2632

27-
stages:
28-
- stage: LocalizationStage
29-
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
30-
jobs:
31-
- job: Localization
33+
extends:
34+
template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines
35+
parameters:
3236
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 }}
37+
name: NetCore1ESPool-Svc-Internal
38+
image: 1es-windows-2022-pt
39+
os: windows
40+
stages:
41+
- stage: LocalizationStage
42+
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
43+
jobs:
44+
- job: Localization
45+
templateContext:
46+
outputs:
47+
- output: pipelineArtifact
48+
displayName: LOC
49+
targetPath: '$(Build.SourcesDirectory)/loc'
50+
condition: ${{ parameters.publishLocalizationFile }}
51+
artifactName: loc
52+
- output: pipelineArtifact
53+
displayName: l10n
54+
targetPath: '$(Build.SourcesDirectory)/l10n'
55+
condition: ${{ parameters.publishLocalizationFile }}
56+
artifactName: l10n
57+
steps:
58+
- task: NodeTool@0
59+
displayName: 'Install Node.js 18.x'
60+
inputs:
61+
# Octokit client needs 18.x to have 'fetch' function.
62+
versionSpec: '18.x'
63+
- checkout: self
64+
clean: true
65+
submodules: true
66+
fetchTags: false
67+
fetchDepth: 0
68+
- pwsh: |
69+
npm install
70+
npm install -g gulp
71+
displayName: 'Install tools'
72+
- pwsh: npm run compile
73+
displayName: 'Compile'
74+
- pwsh: npm run l10nDevGenerateLocalizationBundle
75+
displayName: 'Generate bundle.l10.json'
76+
- pwsh: npm run l10nDevGenerateXlf
77+
displayName: 'Generate xlf files from bundle.10n.json'
78+
- task: OneLocBuild@2
79+
env:
80+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
81+
inputs:
82+
locProj: loc/LocProject.json
83+
outDir: '$(Build.SourcesDirectory)/loc'
84+
isCreatePrSelected: false
85+
patVariable: $(dn-bot-ceapex-package-r)
86+
packageSourceAuth: patAuth
87+
lclSource: lclFilesfromPackage
88+
LclPackageId: 'LCL-JUNO-PROD-VSCODECS'
89+
- pwsh: npm run l10nDevImportXlf
90+
displayName: 'Import xlf to json.'
91+
- pwsh: gulp 'publish localization content' --userName dotnet-bot --email [email protected] --commitSha $(Build.SourceVersion) --targetRemoteRepo vscode-csharp --baseBranch 'main'
92+
displayName: 'Create PR in GitHub.'
93+
env:
94+
GitHubPAT: $(BotAccount-dotnet-bot-repo-PAT)

0 commit comments

Comments
 (0)