msbuild

Форк
0
112 строк · 4.1 Кб
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-official/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: AzurePipelines-EO
53
        image: 1ESPT-Windows2022
54
        demands: Cmd
55
        os: windows
56
      # If it's not devdiv, it's dnceng
57
      ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
58
        name: $(DncEngInternalBuildPool)
59
        image: 1es-windows-2022
60
        os: windows
61

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

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

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

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

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

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

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

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