msbuild

Форк
0
75 строк · 3.6 Кб
1
parameters:
2
  # This template adds arcade-powered source-build to CI. The template produces a server job with a
3
  # default ID 'Source_Build_Complete' to put in a dependency list if necessary.
4

5
  # Specifies the prefix for source-build jobs added to pipeline. Use this if disambiguation needed.
6
  jobNamePrefix: 'Source_Build'
7

8
  # Defines the platform on which to run the job. By default, a linux-x64 machine, suitable for
9
  # managed-only repositories. This is an object with these properties:
10
  #
11
  # name: ''
12
  #   The name of the job. This is included in the job ID.
13
  # targetRID: ''
14
  #   The name of the target RID to use, instead of the one auto-detected by Arcade.
15
  # nonPortable: false
16
  #   Enables non-portable mode. This means a more specific RID (e.g. fedora.32-x64 rather than
17
  #   linux-x64), and compiling against distro-provided packages rather than portable ones.
18
  # skipPublishValidation: false
19
  #   Disables publishing validation.  By default, a check is performed to ensure no packages are
20
  #   published by source-build.
21
  # container: ''
22
  #   A container to use. Runs in docker.
23
  # pool: {}
24
  #   A pool to use. Runs directly on an agent.
25
  # buildScript: ''
26
  #   Specifies the build script to invoke to perform the build in the repo. The default
27
  #   './build.sh' should work for typical Arcade repositories, but this is customizable for
28
  #   difficult situations.
29
  # jobProperties: {}
30
  #   A list of job properties to inject at the top level, for potential extensibility beyond
31
  #   container and pool.
32
  platform: {}
33

34
  # If set to true and running on a non-public project,
35
  # Internal blob storage locations will be enabled.
36
  # This is not enabled by default because many repositories do not need internal sources
37
  # and do not need to have the required service connections approved in the pipeline.
38
  enableInternalSources: false
39

40
jobs:
41
- job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }}
42
  displayName: Source-Build (${{ parameters.platform.name }})
43

44
  ${{ each property in parameters.platform.jobProperties }}:
45
    ${{ property.key }}: ${{ property.value }}
46

47
  ${{ if ne(parameters.platform.container, '') }}:
48
    container: ${{ parameters.platform.container }}
49

50
  ${{ if eq(parameters.platform.pool, '') }}:
51
    # The default VM host AzDO pool. This should be capable of running Docker containers: almost all
52
    # source-build builds run in Docker, including the default managed platform.
53
    # /eng/common/templates-official/variables/pool-providers.yml can't be used here (some customers declare variables already), so duplicate its logic
54
    pool:
55
      ${{ if eq(variables['System.TeamProject'], 'public') }}:
56
        name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore-Svc-Public' ), False, 'NetCore-Public')]
57
        demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
58

59
      ${{ if eq(variables['System.TeamProject'], 'internal') }}:
60
        name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore1ESPool-Svc-Internal'), False, 'NetCore1ESPool-Internal')]
61
        image: 1es-mariner-2
62
        os: linux
63

64
  ${{ if ne(parameters.platform.pool, '') }}:
65
    pool: ${{ parameters.platform.pool }}
66

67
  workspace:
68
    clean: all
69

70
  steps:
71
  - ${{ if eq(parameters.enableInternalSources, true) }}:
72
    - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
73
  - template: /eng/common/templates-official/steps/source-build.yml
74
    parameters:
75
      platform: ${{ parameters.platform }}
76

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

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

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

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