1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
parameters:
jobTemplate: ''
hostedOs: ''
osGroup: ''
osSubgroup: ''
archType: ''
container: ''
helixQueuesTemplate: ''
platform: ''
targetRid: ''
jobParameters: {}
variables: []
jobs:
- template: ${{ coalesce(parameters.helixQueuesTemplate, parameters.jobTemplate) }}
parameters:
${{ if eq(parameters.jobParameters.runtimeFlavor, 'coreclr') }}:
runtimeFlavorDisplayName: 'CoreCLR'
${{ if eq(parameters.jobParameters.runtimeFlavor, 'mono') }}:
runtimeFlavorDisplayName: 'Mono'
shouldContinueOnError: ${{ and(endsWith(variables['Build.DefinitionName'], 'staging'), eq(variables['Build.Reason'], 'PullRequest')) }}
# keep in sync with /eng/pipelines/common/variables.yml
dependOnEvaluatePaths: ${{ and(eq(variables['Build.Reason'], 'PullRequest'), in(variables['Build.DefinitionName'], 'runtime', 'runtime-staging')) }}
variables:
# Disable component governance in our CI builds. These builds are not shipping nor
# are they a service. Also the component governance jobs issue lots of inconsequential
# warnings and errors into our build timelines that make it hard to track down
# real errors in the build
- name: skipComponentGovernanceDetection
value: true
- name: runCodesignValidationInjection
value: false
- name: checkoutFetchDepth
value: 20
- name: buildConfigUpper
${{ if eq(parameters.jobParameters.buildConfig, 'debug') }}:
value: 'Debug'
${{ if eq(parameters.jobParameters.buildConfig, 'release') }}:
value: 'Release'
${{ if eq(parameters.jobParameters.buildConfig, 'checked') }}:
value: 'Checked'
- name: _BuildConfig
value: $(buildConfigUpper)
- ${{ if or(eq(parameters.osGroup, 'windows'), eq(parameters.hostedOs, 'windows')) }}:
- name: archiveExtension
value: '.zip'
- name: archiveType
value: zip
- name: tarCompression
value: ''
- name: scriptExt
value: '.cmd'
- name: dir
value: '\'
- name: _msbuildCommand
value: powershell -ExecutionPolicy ByPass -NoProfile eng\common\msbuild.ps1 -ci
- name: setScriptToEchoAndFailOnNonZero
value: ''
- name: logRootNameArg
value: 'log '
- ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.hostedOs, 'windows')) }}:
- name: archiveExtension
value: '.tar.gz'
- name: archiveType
value: tar
- name: tarCompression
value: gz
- name: scriptExt
value: '.sh'
- name: dir
value: '/'
- name: _msbuildCommand
value: ./eng/common/msbuild.sh --ci
# Set the bash script to display each command, and stop if any command exits nonzero.
- name: setScriptToEchoAndFailOnNonZero
value: 'set -xe'
- name: logRootNameArg
value: '-log:'
- ${{ if ne(parameters.jobParameters.crossrootfsDir, '') }}:
# This is only required for cross builds.
- name: ROOTFS_DIR
value: ${{ parameters.jobParameters.crossrootfsDir }}
- name: runtimeFlavorName
${{ if eq(parameters.jobParameters.runtimeFlavor, 'mono') }}:
value: Mono
${{ if eq(parameters.jobParameters.runtimeFlavor, 'coreclr') }}:
value: CoreCLR
- ${{ each variable in parameters.variables }}:
- ${{ variable }}
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup }}
archType: ${{ parameters.archType }}
targetRid: ${{ parameters.targetRid }}
platform: ${{ parameters.platform }}
${{ if ne(parameters.container, '') }}:
${{ if eq(parameters.container.registry, 'mcr') }}:
container: ${{ format('{0}:{1}', 'mcr.microsoft.com/dotnet-buildtools/prereqs', parameters.container.image) }}
${{ if ne(parameters.container.registry, 'mcr') }}:
container: ${{ format('{0}:{1}', parameters.container.registry, parameters.container.image) }}
${{ if eq(parameters.jobParameters.pool, '') }}:
pool:
# Public Linux Build Pool
${{ if and(or(in(parameters.osGroup, 'Linux', 'FreeBSD', 'Android', 'Tizen'), eq(parameters.hostedOs, 'Linux')), eq(variables['System.TeamProject'], 'public')) }}:
name: NetCore1ESPool-Public
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
# Official Build Linux Pool
${{ if and(or(in(parameters.osGroup, 'Linux', 'FreeBSD', 'Browser', 'Android', 'Tizen'), eq(parameters.hostedOs, 'Linux')), ne(variables['System.TeamProject'], 'public')) }}:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
# OSX Build Pool (we don't have on-prem OSX BuildPool
${{ if in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'iOSSimulator', 'tvOS', 'tvOSSimulator') }}:
vmImage: 'macOS-10.15'
# Official Build Windows Pool
${{ if and(eq(parameters.osGroup, 'windows'), ne(variables['System.TeamProject'], 'public')) }}:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals Build.Windows.10.Amd64.VS2019
# Public Windows Build Pool
${{ if and(or(eq(parameters.osGroup, 'windows'), eq(parameters.hostedOs, 'windows')), eq(variables['System.TeamProject'], 'public')) }}:
name: NetCore1ESPool-Public
demands: ImageOverride -equals Build.Windows.10.Amd64.VS2019.Open
${{ if eq(parameters.helixQueuesTemplate, '') }}:
# macOS hosted pool machines are slower so we need to give a greater timeout than the 60 mins default.
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS')) }}:
timeoutInMinutes: 120
${{ insert }}: ${{ parameters.jobParameters }}
${{ if ne(parameters.helixQueuesTemplate, '') }}:
jobTemplate: ${{ parameters.jobTemplate }}
jobParameters: ${{ parameters.jobParameters }}
|