msbuild

Форк
0
/
onelocbuild.yml 
109 строк · 4.0 Кб
1
parameters:
2
  # Optional: dependencies of the job
3
  dependsOn: ''
4

5
  # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
6
  pool: ''
7
    
8
  CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex
9
  GithubPat: $(BotAccount-dotnet-bot-repo-PAT)
10

11
  SourcesDirectory: $(Build.SourcesDirectory)
12
  CreatePr: true
13
  AutoCompletePr: false
14
  ReusePr: true
15
  UseLfLineEndings: true
16
  UseCheckedInLocProjectJson: false
17
  SkipLocProjectJsonGeneration: false
18
  LanguageSet: VS_Main_Languages
19
  LclSource: lclFilesInRepo
20
  LclPackageId: ''
21
  RepoType: gitHub
22
  GitHubOrg: dotnet
23
  MirrorRepo: ''
24
  MirrorBranch: main
25
  condition: ''
26
  JobNameSuffix: ''
27

28
jobs:
29
- job: OneLocBuild${{ parameters.JobNameSuffix }}
30
  
31
  dependsOn: ${{ parameters.dependsOn }}
32

33
  displayName: OneLocBuild${{ parameters.JobNameSuffix }}
34

35
  variables:
36
    - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat
37
    - name: _GenerateLocProjectArguments
38
      value: -SourcesDirectory ${{ parameters.SourcesDirectory }}
39
        -LanguageSet "${{ parameters.LanguageSet }}"
40
        -CreateNeutralXlfs
41
    - ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}:
42
      - name: _GenerateLocProjectArguments
43
        value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson
44
    - template: /eng/common/templates/variables/pool-providers.yml
45

46
  ${{ if ne(parameters.pool, '') }}:
47
    pool: ${{ parameters.pool }}
48
  ${{ if eq(parameters.pool, '') }}:
49
    pool:
50
      # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
51
      ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
52
        name: VSEngSS-MicroBuild2022-1ES
53
        demands: Cmd
54
      # If it's not devdiv, it's dnceng
55
      ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
56
        name: $(DncEngInternalBuildPool)
57
        demands: ImageOverride -equals windows.vs2019.amd64
58

59
  steps:
60
    - ${{ if ne(parameters.SkipLocProjectJsonGeneration, 'true') }}:
61
      - task: Powershell@2
62
        inputs:
63
          filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1
64
          arguments: $(_GenerateLocProjectArguments)
65
        displayName: Generate LocProject.json
66
        condition: ${{ parameters.condition }}
67

68
    - task: OneLocBuild@2
69
      displayName: OneLocBuild
70
      env:
71
        SYSTEM_ACCESSTOKEN: $(System.AccessToken)
72
      inputs:
73
        locProj: eng/Localize/LocProject.json
74
        outDir: $(Build.ArtifactStagingDirectory)
75
        lclSource: ${{ parameters.LclSource }}
76
        lclPackageId: ${{ parameters.LclPackageId }}
77
        isCreatePrSelected: ${{ parameters.CreatePr }}
78
        isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }}
79
        ${{ if eq(parameters.CreatePr, true) }}:
80
          isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }}
81
          ${{ if eq(parameters.RepoType, 'gitHub') }}:
82
            isShouldReusePrSelected: ${{ parameters.ReusePr }}
83
        packageSourceAuth: patAuth
84
        patVariable: ${{ parameters.CeapexPat }}
85
        ${{ if eq(parameters.RepoType, 'gitHub') }}:
86
          repoType: ${{ parameters.RepoType }}
87
          gitHubPatVariable: "${{ parameters.GithubPat }}"
88
        ${{ if ne(parameters.MirrorRepo, '') }}:
89
          isMirrorRepoSelected: true
90
          gitHubOrganization: ${{ parameters.GitHubOrg }}
91
          mirrorRepo: ${{ parameters.MirrorRepo }}
92
          mirrorBranch: ${{ parameters.MirrorBranch }}
93
      condition: ${{ parameters.condition }}
94

95
    - task: PublishBuildArtifacts@1
96
      displayName: Publish Localization Files
97
      inputs:
98
        PathtoPublish: '$(Build.ArtifactStagingDirectory)/loc'
99
        PublishLocation: Container
100
        ArtifactName: Loc
101
      condition: ${{ parameters.condition }}
102

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

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.