-
Notifications
You must be signed in to change notification settings - Fork 5k
Expand file tree
/
Copy pathpipeline.libbeat.yml
More file actions
368 lines (345 loc) · 11.7 KB
/
Copy pathpipeline.libbeat.yml
File metadata and controls
368 lines (345 loc) · 11.7 KB
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
name: "beats-libbeat"
env:
AWS_ARM_INSTANCE_TYPE: "t4g.xlarge"
AWS_IMAGE_UBUNTU_ARM_64: "platform-ingest-beats-ubuntu-2004-aarch64-1782878510"
GCP_DEFAULT_MACHINE_TYPE: "c2d-highcpu-8"
GCP_HI_PERF_MACHINE_TYPE: "c2d-highcpu-16"
GCP_WIN_MACHINE_TYPE: "n2-standard-8"
IMAGE_UBUNTU_X86_64: "platform-ingest-beats-ubuntu-2204-1782878510"
IMAGE_WIN_10: "platform-ingest-beats-windows-10-pro"
IMAGE_WIN_11: "platform-ingest-beats-windows-11-pro"
IMAGE_WIN_10_VERSION: "1.0.1782878510"
IMAGE_WIN_11_VERSION: "1.0.1782878510"
IMAGE_WIN_2016: "platform-ingest-beats-windows-2016-1782878510"
IMAGE_WIN_2019: "platform-ingest-beats-windows-2019-1782878510"
IMAGE_WIN_2022: "platform-ingest-beats-windows-2022-1782878510"
IMAGE_BEATS_WITH_HOOKS_LATEST: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:latest"
#Deps
ASDF_MAGE_VERSION: 1.15.0
# Unit tests
RACE_DETECTOR: "true"
TEST_COVERAGE: "true"
steps:
- group: "Check/Update"
key: "libbeat-check-update"
steps:
- label: "Libbeat: Run check/update"
command: |
set -eo pipefail
make -C libbeat check update
make check-no-changes
retry:
automatic:
- limit: 1
agents:
image: "${IMAGE_BEATS_WITH_HOOKS_LATEST}"
cpu: "4000m"
memory: "8Gi"
useCustomGlobalHooks: true
notify:
- github_commit_status:
context: "libbeat: check/update"
- label: "Libbeat: Run pre-commit"
command: "pre-commit run --all-files"
agents:
image: "${IMAGE_BEATS_WITH_HOOKS_LATEST}"
memory: "2Gi"
useCustomGlobalHooks: true
notify:
- github_commit_status:
context: "libbeat: pre-commit"
- wait: ~
# with PRs, we want to run mandatory tests only if check/update step succeed
# for other cases, e.g. merge commits, we want to run mundatory test (and publish) independently of other tests
# this allows building DRA artifacts even if there is flakiness in check/update step
if: build.env("BUILDKITE_PULL_REQUEST") != "false"
depends_on: "libbeat-check-update"
- group: "Mandatory Tests"
key: "mandatory-tests"
steps:
- label: ":ubuntu: Libbeat: Ubuntu x86_64 Unit Tests"
key: "mandatory-linux-unit-test"
command: |
set -euo pipefail
cd libbeat
mage build unitTest
retry:
automatic:
- limit: 1
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_DEFAULT_MACHINE_TYPE}"
artifact_paths:
- "libbeat/build/*.xml"
- "libbeat/build/*.json"
plugins:
- test-collector#v1.10.2:
files: "libbeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "libbeat: Ubuntu x86_64 Unit Tests"
- label: ":ubuntu: Libbeat: Ubuntu x86_64 Go Unit Tests with fips provider and requirefips build tag"
key: "mandatory-linux-unit-test-fips-tag"
command: |
cd libbeat
mage goUnitTest
retry:
automatic:
- limit: 1
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_DEFAULT_MACHINE_TYPE}"
env:
FIPS: "true"
artifact_paths:
- "libbeat/build/*.xml"
- "libbeat/build/*.json"
plugins:
- test-collector#v1.10.2:
files: "libbeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "libbeat: Ubuntu x86_64 Go Unit Tests with fips provider and requirefips build tag"
- label: ":ubuntu: Libbeat: Ubuntu x86_64 fips140=only Unit Tests"
key: "mandatory-linux-unit-test-fips-only"
command: |
set -euo pipefail
cd libbeat
mage goFIPSOnlyUnitTest
retry:
automatic:
- limit: 1
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_DEFAULT_MACHINE_TYPE}"
env:
FIPS: "true"
artifact_paths:
- "libbeat/build/*.xml"
- "libbeat/build/*.json"
plugins:
- test-collector#v1.10.2:
files: "libbeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "libbeat: Ubuntu x86_64 fips140=only Unit Tests"
- label: ":ubuntu: Libbeat: Go Integration Tests"
command: |
set -euo pipefail
cd libbeat
mage goIntegTest
retry:
automatic:
- limit: 1
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"
artifact_paths:
- "libbeat/build/*.xml"
- "libbeat/build/*.json"
- "libbeat/build/integration-tests/*"
- "libbeat/build/integration-tests/Test*/*"
- "libbeat/build/integration-tests/Test*/data/**/*"
plugins:
- test-collector#v1.10.2:
files: "libbeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "libbeat: Go Integration Tests / Ubuntu x86_64"
- label: ":windows: Libbeat: Go Integration Tests"
skip: "Skipped due to https://github.com/elastic/beats/issues/44537"
if: build.env("BUILDKITE_PULL_REQUEST") != "false"
command: |
cd libbeat
mage goIntegTest
retry:
automatic:
- limit: 1
agents:
provider: "gcp"
image: "${IMAGE_WIN_2022}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 200
disk_type: "pd-ssd"
artifact_paths:
- "libbeat/build/*.xml"
- "libbeat/build/*.json"
- "libbeat/build/integration-tests/*"
- "libbeat/build/integration-tests/Test*/*"
- "libbeat/build/integration-tests/Test*/data/**/*"
plugins:
- test-collector#v1.10.2:
files: "libbeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "libbeat: Go Integration Tests / Windows"
- label: ":ubuntu: Libbeat: Stress Tests"
key: "mandatory-stress-test"
command: |
set -euo pipefail
cd libbeat
make STRESS_TEST_OPTIONS='-timeout=20m -race -v -parallel 1' GOTEST_OUTPUT_OPTIONS=' | go-junit-report > libbeat-stress-test.xml' stress-tests
retry:
automatic:
- limit: 1
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_DEFAULT_MACHINE_TYPE}"
artifact_paths: "libbeat/libbeat-stress-test.xml"
notify:
- github_commit_status:
context: "libbeat: Stress Tests"
- label: ":windows: Libbeat: Win 2016 Unit Tests"
command: |
Set-Location -Path libbeat
mage -w reader\etw build goUnitTest
key: "mandatory-win-2016-unit-tests"
retry:
automatic:
- limit: 1
agents:
provider: "gcp"
image: "${IMAGE_WIN_2016}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths:
- "libbeat/build/*.xml"
- "libbeat/build/*.json"
notify:
- github_commit_status:
context: "libbeat: Win 2016 Unit Tests"
- label: ":windows: Libbeat: Win 2022 Unit Tests"
command: |
Set-Location -Path libbeat
mage -w reader\etw build goUnitTest
key: "mandatory-win-2022-unit-tests"
retry:
automatic:
- limit: 1
agents:
provider: "gcp"
image: "${IMAGE_WIN_2022}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths:
- "libbeat/build/*.xml"
- "libbeat/build/*.json"
notify:
- github_commit_status:
context: "libbeat: Win 2022 Unit Tests"
- group: "Extended Tests"
key: "extended-tests"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*arm.*/
steps:
- label: ":ubuntu: Libbeat: Ubuntu arm64 Unit Tests"
key: "extended-arm64-unit-tests"
command: |
set -euo pipefail
cd libbeat
mage build unitTest
retry:
automatic:
- limit: 1
agents:
provider: "aws"
image: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
artifact_paths:
- "libbeat/build/*.xml"
- "libbeat/build/*.json"
plugins:
- test-collector#v1.10.2:
files: "libbeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "libbeat: Ubuntu arm64 Unit Tests"
- group: "Extended Windows Tests"
key: "libbeat-extended-win-tests"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*[Ww]indows.*/
steps:
- label: ":windows: Libbeat: Win 10 Unit Tests"
command: |
Set-Location -Path libbeat
mage -w reader\etw build goUnitTest
key: "extended-win-10-unit-tests"
retry:
automatic:
- limit: 1
agents:
provider: "azure"
image: "${IMAGE_WIN_10}"
imageVersion: "${IMAGE_WIN_10_VERSION}"
vmSize: "Standard_D8s_v5"
diskSizeGb: "256"
artifact_paths:
- "libbeat/build/*.xml"
- "libbeat/build/*.json"
notify:
- github_commit_status:
context: "libbeat: Win 10 Unit Tests"
- label: ":windows: Libbeat: Win 11 Unit Tests"
command: |
Set-Location -Path libbeat
mage -w reader\etw build goUnitTest
key: "extended-win-11-unit-tests"
retry:
automatic:
- limit: 1
agents:
provider: "azure"
image: "${IMAGE_WIN_11}"
imageVersion: "${IMAGE_WIN_11_VERSION}"
vmSize: "Standard_D8s_v5"
diskSizeGb: "256"
artifact_paths:
- "libbeat/build/*.xml"
- "libbeat/build/*.json"
notify:
- github_commit_status:
context: "libbeat: Win 11 Unit Tests"
- label: ":windows: Libbeat: Win 2019 Unit Tests"
command: |
Set-Location -Path libbeat
mage -w reader\etw build goUnitTest
key: "extended-win-2019-unit-tests"
retry:
automatic:
- limit: 1
agents:
provider: "gcp"
image: "${IMAGE_WIN_2019}"
machineType: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths:
- "libbeat/build/*.xml"
- "libbeat/build/*.json"
notify:
- github_commit_status:
context: "libbeat: Win 2019 Unit Tests"