Welcome to mirror list, hosted at ThFree Co, Russian Federation.

onelocbuild.yml « job « templates « common « eng - github.com/dotnet/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9d1e3042d8a6c05ad0691774d2551a37e78482a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
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: ''
    
  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
  AutoCompletePr: false
  ReusePr: true
  UseLfLineEndings: true
  UseCheckedInLocProjectJson: false
  LanguageSet: VS_Main_Languages
  LclSource: lclFilesInRepo
  LclPackageId: ''
  RepoType: gitHub
  GitHubOrg: dotnet
  MirrorRepo: ''
  MirrorBranch: main
  condition: ''

jobs:
- job: OneLocBuild
  
  dependsOn: ${{ parameters.dependsOn }}

  displayName: OneLocBuild

  ${{ 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') }}:
        name: NetCore1ESPool-Internal
        demands: ImageOverride -equals Build.Server.Amd64.VS2019

  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
      condition: ${{ parameters.condition }}

    - task: OneLocBuild@2
      displayName: OneLocBuild
      env:
        SYSTEM_ACCESSTOKEN: $(System.AccessToken)
      inputs:
        locProj: eng/Localize/LocProject.json
        outDir: $(Build.ArtifactStagingDirectory)
        lclSource: ${{ parameters.LclSource }}
        lclPackageId: ${{ parameters.LclPackageId }}
        isCreatePrSelected: ${{ parameters.CreatePr }}
        ${{ if eq(parameters.CreatePr, true) }}:
          isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }}
          isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }}
          ${{ if eq(parameters.RepoType, 'gitHub') }}:
            isShouldReusePrSelected: ${{ parameters.ReusePr }}
        packageSourceAuth: patAuth
        patVariable: ${{ parameters.CeapexPat }}
        ${{ if eq(parameters.RepoType, 'gitHub') }}:
          repoType: ${{ parameters.RepoType }}
          gitHubPatVariable: "${{ parameters.GithubPat }}"
        ${{ if ne(parameters.MirrorRepo, '') }}:
          isMirrorRepoSelected: true
          gitHubOrganization: ${{ parameters.GitHubOrg }}
          mirrorRepo: ${{ parameters.MirrorRepo }}
          mirrorBranch: ${{ parameters.MirrorBranch }}
      condition: ${{ parameters.condition }}

    - task: PublishBuildArtifacts@1
      displayName: Publish Localization Files
      inputs:
        PathtoPublish: '$(Build.ArtifactStagingDirectory)/loc'
        PublishLocation: Container
        ArtifactName: Loc
      condition: ${{ parameters.condition }}

    - task: PublishBuildArtifacts@1
      displayName: Publish LocProject.json
      inputs:
        PathtoPublish: '$(Build.SourcesDirectory)/eng/Localize/'
        PublishLocation: Container
        ArtifactName: Loc
      condition: ${{ parameters.condition }}