-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
azure-pipelines.yml
207 lines (194 loc) · 6.01 KB
/
azure-pipelines.yml
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool.
# This pipeline will be extended to the OneESPT template
trigger:
- master
- releases/*
resources:
repositories:
- repository: AzureDevOps
type: git
name: AzureDevOps/AzureDevOps
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
parameters:
- name: task_name
displayName: Task Name (List of tasks to build (e.g. BashV3 [, AzureCLIV1]))
type: string
default: TaskNameVN
- name: deploy_all_tasks
displayName: Build all tasks for deployment
type: boolean
default: false
- name: enableCodeQL
displayName: Enable CodeQL for run
type: boolean
default: false
variables:
- name: currentDate
value: $[ format('{0:yyyy}{0:MM}{0:dd}', pipeline.startTime) ]
- name: taskName
value: ${{ parameters.task_name }}
- name: taskNameIsSet
value: ${{ not(eq(parameters.task_name, 'TaskNameVN')) }}
- name: runCodeQl
value: ${{ eq(parameters.enableCodeQL, true) }}
- name: system.debug
value: true
- group: Courtesy-Push-GitHub-AccessToken
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
settings:
skipBuildTagsForGitHubPullRequests: true
featureFlags:
autoBaseline: false
sdl:
sbom:
enabled: false
baseline:
baselineSet: default
baselineFile: $(Build.SourcesDirectory)/.gdn/.gdnbaselines
sourceAnalysisPool:
name: 1ES-ABTT-Shared-Pool
image: abtt-windows-2022
os: windows
sourceRepositoriesToScan:
exclude:
- repository: AzureDevOps
- repository: ConfigChange
customBuildTags:
- ES365AIMigrationTooling
stages:
- stage: main
jobs:
# All tasks on Windows
- job: build_all_windows
displayName: Build all tasks (Windows)
condition: eq(variables.os, 'Windows_NT')
timeoutInMinutes: 360
pool:
name: 1ES-ABTT-Shared-Pool
image: abtt-windows-2022
os: windows
templateContext:
outputs:
- output: buildArtifacts
displayName: 'Publish package artifact'
condition: >
and(
succeeded(),
ne(variables['build.reason'], 'PullRequest'),
ne(variables['numTasks'], 0)
)
PathtoPublish: _package/tasks.zip
ArtifactName: package
steps:
- template: /ci/build-all-steps.yml@self
parameters:
os: Windows_NT
# Publish
- job: publish
displayName: Publish
dependsOn:
- build_all_windows
condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest'))
pool:
name: 1ES-ABTT-Shared-Pool
image: abtt-windows-2022
os: windows
templateContext:
outputs:
- output: buildArtifacts
displayName: 'Publish per task NuGet package artifact'
PathtoPublish: _package/nuget-packages
ArtifactName: IndividualNuGetPackages
steps:
- template: /ci/publish-steps.yml@self
# Courtesy Push
- job: courtesy_push
displayName: Courtesy Push
timeoutInMinutes: 180
pool:
name: 1ES-ABTT-Shared-Pool
image: abtt-windows-2022
os: windows
dependsOn:
- publish
condition: |
and(
succeeded(),
eq(variables['COURTESY_PUSH'], 'true'),
or(
eq(variables['build.reason'], 'Schedule'),
and(
eq(variables['build.reason'], 'Manual'),
eq(variables['FORCE_COURTESY_PUSH'], 'true')
)
)
)
templateContext:
outputs:
- output: nuget
packagesToPush: '$(Build.SourcesDirectory)/IndividualNugetPackagesDownloaded/IndividualNugetPackages/*/*.nupkg'
packageParentPath: '$(Build.SourcesDirectory)'
publishVstsFeed: 'c86767d8-af79-4303-a7e6-21da0ba435e2/e10d0795-57cd-4d7f-904e-5f39703cb096'
nuGetFeedType: internal
displayName: Push Nuget package
allowPackageConflicts: $(COURTESY_PUSH)
steps:
- checkout: AzureDevOps
fetchDepth: 1
persistCredentials: true
- checkout: self
- template: /ci/courtesy-push.yml@self
- job: build_all_tasks_for_deployments
displayName: Build all tasks for deployments (Windows)
dependsOn:
- courtesy_push
- build_all_windows
condition: succeeded()
timeoutInMinutes: 360
pool:
name: 1ES-ABTT-Shared-Pool
image: abtt-windows-2022
os: windows
variables:
task_pattern: $[dependencies.build_all_windows.outputs['getTaskPattern.task_pattern']]
templateContext:
outputs:
- output: buildArtifacts
displayName: 'Publish package artifact'
PathtoPublish: _package/tasks.zip
ArtifactName: allTasks
steps:
- template: /ci/build-all-tasks.yml@self
parameters:
deploy_all_tasks: ${{ parameters.deploy_all_tasks }}
# All tasks on Linux
- job: build_all_linux
displayName: Build all tasks (Linux)
condition: eq(variables.os, 'Linux')
timeoutInMinutes: 360
pool:
name: 1ES-ABTT-Shared-Pool
image: abtt-ubuntu-2204
os: linux
steps:
- template: /ci/build-all-steps.yml@self
parameters:
os: Linux
# All tasks on macOS
- job: build_all_darwin
displayName: Build all tasks (macOS)
condition: eq(variables.os, 'Darwin')
timeoutInMinutes: 360
pool:
name: Azure Pipelines
image: macos-14
os: macOS
steps:
- template: /ci/build-all-steps.yml@self
parameters:
os: Darwin