@@ -34,8 +34,6 @@ parameters:
34
34
jobs :
35
35
- job : ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }}
36
36
displayName : Source-Build (${{ parameters.platform.name }})
37
- variables :
38
- - template : /eng/common/templates/variables/pool-providers.yml
39
37
40
38
${{ each property in parameters.platform.jobProperties }} :
41
39
${{ property.key }} : ${{ property.value }}
@@ -46,13 +44,24 @@ jobs:
46
44
${{ if eq(parameters.platform.pool, '') }} :
47
45
# The default VM host AzDO pool. This should be capable of running Docker containers: almost all
48
46
# source-build builds run in Docker, including the default managed platform.
47
+ # /eng/common/templates/variables/pool-providers.yml can't be used here (some customers declare variables already), so duplicate its logic
49
48
pool :
50
- ${{ if eq(variables['System.TeamProject'], 'public') }} :
51
- name : $(DncEngPublicBuildPool)
49
+ # Main environments
50
+ ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), true)) }} :
51
+ name : NetCore-Public
52
52
demands : ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
53
- ${{ if eq(variables['System.TeamProject'], 'internal') }} :
54
- name : $(DncEngInternalBuildPool)
53
+ ${{ if and( eq(variables['System.TeamProject'], 'internal'), ne(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), true) ) }} :
54
+ name : NetCore1ESPool-Internal
55
55
demands : ImageOverride -equals Build.Ubuntu.1804.Amd64
56
+
57
+ # Servicing build environments
58
+ ${{ if and(eq(variables['System.TeamProject'], 'public'), contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release')) }} :
59
+ name : NetCore-Svc-Public
60
+ demands : ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
61
+ ${{ if and(eq(variables['System.TeamProject'], 'internal'), contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release')) }} :
62
+ name : NetCore1ESPool-Svc-Internal
63
+ demands : ImageOverride -equals Build.Ubuntu.1804.Amd64
64
+
56
65
${{ if ne(parameters.platform.pool, '') }} :
57
66
pool : ${{ parameters.platform.pool }}
58
67
0 commit comments