msbuild

Форк
0
45 строк · 2.2 Кб
1
# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, 
2
# otherwise it should go into the "normal" pools. This separates out the queueing and billing of released branches.
3

4
# Motivation: 
5
#   Once a given branch of a repository's output has been officially "shipped" once, it is then considered to be COGS
6
#   (Cost of goods sold) and should be moved to a servicing pool provider. This allows both separation of queueing
7
#   (allowing release builds and main PR builds to not intefere with each other) and billing (required for COGS.
8
#   Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services 
9
#   team needs to move resources around and create new and potentially differently-named pools. Using this template 
10
#   file from an Arcade-ified repo helps guard against both having to update one's release/* branches and renaming.
11

12
# How to use: 
13
#  This yaml assumes your shipped product branches use the naming convention "release/..." (which many do).
14
#  If we find alternate naming conventions in broad usage it can be added to the condition below.
15
#
16
#  First, import the template in an arcade-ified repo to pick up the variables, e.g.:
17
#
18
#  variables:
19
#  - template: /eng/common/templates-official/variables/pool-providers.yml
20
#
21
#  ... then anywhere specifying the pool provider use the runtime variables,
22
#      $(DncEngInternalBuildPool)
23
#
24
#        pool:
25
#           name: $(DncEngInternalBuildPool)
26
#           image: 1es-windows-2022
27

28
variables:
29
  # Coalesce the target and source branches so we know when a PR targets a release branch
30
  # If these variables are somehow missing, fall back to main (tends to have more capacity)
31

32
  # Any new -Svc alternative pools should have variables added here to allow for splitting work
33

34
  - name: DncEngInternalBuildPool
35
    value: $[
36
        replace(
37
          replace(
38
            eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'),
39
            True,
40
            'NetCore1ESPool-Svc-Internal'
41
          ),
42
          False,
43
          'NetCore1ESPool-Internal'
44
        )
45
      ]

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

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

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

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