-
Notifications
You must be signed in to change notification settings - Fork 4.9k
/
pipeline.xpack.filebeat.yml
467 lines (436 loc) · 15.6 KB
/
pipeline.xpack.filebeat.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
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
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
name: "beats-xpack-filebeat"
env:
AWS_ARM_INSTANCE_TYPE: "m6g.xlarge"
AWS_IMAGE_UBUNTU_ARM_64: "platform-ingest-beats-ubuntu-2204-aarch64"
GCP_DEFAULT_MACHINE_TYPE: "c2d-highcpu-8"
GCP_HI_PERF_MACHINE_TYPE: "c2d-highcpu-16"
GCP_WIN_MACHINE_TYPE: "n2-standard-8"
IMAGE_MACOS_ARM: "generic-13-ventura-arm"
IMAGE_MACOS_X86_64: "generic-13-ventura-x64"
IMAGE_UBUNTU_X86_64: "family/platform-ingest-beats-ubuntu-2204"
IMAGE_WIN_10: "family/platform-ingest-beats-windows-10"
IMAGE_WIN_11: "family/platform-ingest-beats-windows-11"
IMAGE_WIN_2016: "family/platform-ingest-beats-windows-2016"
IMAGE_WIN_2019: "family/platform-ingest-beats-windows-2019"
IMAGE_WIN_2022: "family/platform-ingest-beats-windows-2022"
IMAGE_BEATS_WITH_HOOKS_LATEST: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:latest"
# Other deps
ASDF_MAGE_VERSION: 1.15.0
# Unit tests
RACE_DETECTOR: "true"
TEST_COVERAGE: "true"
# Concurrency definition
CONCURRENCY_GROUP: "orka-concurrency-group"
CONCURRENCY_COUNT: 10
CONCURRENCY_METHOD: eager
steps:
- group: "Check/Update"
key: "x-pack-filebeat-check-update"
steps:
- label: "x-pack/filebeat: Run check/update"
command: |
set -eo pipefail
make -C x-pack/filebeat 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: "x-pack/filebeat: check/update"
- label: "x-pack/filebeat: 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: "x-pack/filebeat: 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: "x-pack-filebeat-check-update"
- group: "Mandatory Tests"
key: "x-pack-filebeat-mandatory-tests"
steps:
- label: ":ubuntu: x-pack/filebeat: Ubuntu x86_64 Unit Tests"
key: "x-pack-filebeat-mandatory-linux-unit-test"
command: |
cd x-pack/filebeat
mage build unitTest
retry:
automatic:
- limit: 1
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_DEFAULT_MACHINE_TYPE}"
artifact_paths:
- "x-pack/filebeat/build/*.xml"
- "x-pack/filebeat/build/*.json"
plugins:
- test-collector#v1.10.2:
files: "x-pack/filebeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "x-pack/filebeat: Ubuntu x86_64 Unit Tests"
- label: ":ubuntu: x-pack/filebeat: Go Integration Tests"
key: "x-pack-filebeat-mandatory-int-test"
command: |
cd x-pack/filebeat
mage goIntegTest
retry:
automatic:
- limit: 1
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_DEFAULT_MACHINE_TYPE}"
artifact_paths:
- "x-pack/filebeat/build/*.xml"
- "x-pack/filebeat/build/*.json"
plugins:
- test-collector#v1.10.2:
files: "x-pack/filebeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "x-pack/filebeat: Go Integration Tests"
- label: ":ubuntu: x-pack/filebeat: Python Integration Tests"
key: "x-pack-filebeat-mandatory-python-int-test"
command: |
cd x-pack/filebeat
mage pythonIntegTest
retry:
automatic:
- limit: 1
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_DEFAULT_MACHINE_TYPE}"
artifact_paths:
- "x-pack/filebeat/build/*.xml"
- "x-pack/filebeat/build/*.json"
plugins:
- test-collector#v1.10.2:
files: "x-pack/filebeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "x-pack/filebeat: Python Integration Tests"
- label: ":windows: x-pack/filebeat: Win 2022 Unit Tests"
command: |
Set-Location -Path x-pack/filebeat
mage build unitTest
key: "x-pack-filebeat-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:
- "x-pack/filebeat/build/*.xml"
- "x-pack/filebeat/build/*.json"
plugins:
- test-collector#v1.10.2:
files: "x-pack/filebeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "x-pack/filebeat: Win 2022 Unit Tests"
- label: ":windows: x-pack/filebeat: Win 2016 Unit Tests"
command: |
Set-Location -Path x-pack/filebeat
mage build unitTest
key: "x-pack-filebeat-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:
- "x-pack/filebeat/build/*.xml"
- "x-pack/filebeat/build/*.json"
plugins:
- test-collector#v1.10.2:
files: "x-pack/filebeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "x-pack/filebeat: Win 2016 Unit Tests"
- group: "Extended Windows Tests"
key: "x-pack-filebeat-extended-win-tests"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*[Ww]indows.*/
steps:
- label: ":windows: x-pack/filebeat: Win 2019 Unit Tests"
command: |
Set-Location -Path x-pack/filebeat
mage build unitTest
key: "x-pack-filebeat-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:
- "x-pack/filebeat/build/*.xml"
- "x-pack/filebeat/build/*.json"
plugins:
- test-collector#v1.10.2:
files: "x-pack/filebeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "x-pack/filebeat: Win 2019 Unit Tests"
- label: ":windows: x-pack/filebeat: Win 10 Unit Tests"
command: |
Set-Location -Path x-pack/filebeat
mage build unitTest
key: "x-pack-filebeat-extended-win-10-unit-tests"
retry:
automatic:
- limit: 1
agents:
provider: "gcp"
image: "${IMAGE_WIN_10}"
machineType: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths:
- "x-pack/filebeat/build/*.xml"
- "x-pack/filebeat/build/*.json"
plugins:
- test-collector#v1.10.2:
files: "x-pack/filebeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "x-pack/filebeat: Win 10 Unit Tests"
- label: ":windows: x-pack/filebeat: Win 11 Unit Tests"
command: |
Set-Location -Path x-pack/filebeat
mage build unitTest
key: "x-pack-filebeat-extended-win-11-unit-tests"
retry:
automatic:
- limit: 1
agents:
provider: "gcp"
image: "${IMAGE_WIN_11}"
machineType: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths:
- "x-pack/filebeat/build/*.xml"
- "x-pack/filebeat/build/*.json"
plugins:
- test-collector#v1.10.2:
files: "x-pack/filebeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "x-pack/filebeat: Win 11 Unit Tests"
- group: "Extended Tests"
key: "x-pack-filebeat-extended-tests"
steps:
- label: ":ubuntu: x-pack/filebeat: Ubuntu arm64 Unit Tests"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*arm.*/
key: "x-pack-filebeat-mandatory-linux-arm-unit-test"
command: |
cd x-pack/filebeat
mage build unitTest
retry:
automatic:
- limit: 1
agents:
provider: "aws"
imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
artifact_paths:
- "x-pack/filebeat/build/*.xml"
- "x-pack/filebeat/build/*.json"
plugins:
- test-collector#v1.10.2:
files: "x-pack/filebeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "x-pack/filebeat: Ubuntu arm64 Unit Tests"
- label: ":mac: x-pack/filebeat: macOS x86_64 Unit Tests"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/
command: |
set -euo pipefail
source .buildkite/scripts/install_macos_tools.sh
cd x-pack/filebeat
mage build unitTest
concurrency_group: "${CONCURRENCY_GROUP}"
concurrency: "${CONCURRENCY_COUNT}"
concurrency_method: "${CONCURRENCY_METHOD}"
retry:
automatic:
- limit: 3 # using higher retries for now due to lack of custom vm images and vendor instability
agents:
provider: "orka"
imagePrefix: "${IMAGE_MACOS_X86_64}"
artifact_paths:
- "x-pack/filebeat/build/*.xml"
- "x-pack/filebeat/build/*.json"
plugins:
- test-collector#v1.10.2:
files: "x-pack/filebeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "x-pack/filebeat: macOS x86_64 Unit Tests"
- label: ":mac: x-pack/filebeat: macOS arm64 Unit Tests"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/
command: |
set -euo pipefail
source .buildkite/scripts/install_macos_tools.sh
cd x-pack/filebeat
mage build unitTest
concurrency_group: "${CONCURRENCY_GROUP}"
concurrency: "${CONCURRENCY_COUNT}"
concurrency_method: "${CONCURRENCY_METHOD}"
retry:
automatic:
- limit: 3 # using higher retries for now due to lack of custom vm images and vendor instability
agents:
provider: "orka"
imagePrefix: "${IMAGE_MACOS_ARM}"
artifact_paths:
- "x-pack/filebeat/build/*.xml"
- "x-pack/filebeat/build/*.json"
plugins:
- test-collector#v1.10.2:
files: "x-pack/filebeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "x-pack/filebeat: macOS arm64 Unit Tests"
- label: ":ubuntu: x-pack/filebeat: AWS Tests"
key: "x-pack-filebeat-extended-cloud-test"
skip: "skipping: elastic/ingest-dev#3467"
# Related issue: https://github.com/elastic/ingest-dev/issues/3467
if: build.env("GITHUB_PR_LABELS") =~ /.*aws.*/
env:
ASDF_TERRAFORM_VERSION: 1.0.2
MODULE_DIR: "x-pack/filebeat/input/awss3/_meta/terraform"
MODULE: "aws"
# TEST_TAGS should be reviewed and updated: https://github.com/elastic/ingest-dev/issues/3476
TEST_TAGS: "aws"
command: |
set -euo pipefail
source .buildkite/scripts/initCloudEnv.sh
echo "~~~ Running tests"
cd x-pack/filebeat
mage build test goIntegTest
agents:
provider: "aws"
imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
artifact_paths:
- "x-pack/filebeat/build/*.xml"
- "x-pack/filebeat/build/*.json"
plugins:
- test-collector#v1.10.2:
files: "x-pack/filebeat/build/TEST-*.xml"
format: "junit"
branches: "main"
debug: true
notify:
- github_commit_status:
context: "x-pack/filebeat: AWS Tests"
- wait: ~
# with PRs, we want to run packaging only if mandatory tests succeed
# for other cases, e.g. merge commits, we want to run packaging (and publish) independently of other tests
# this allows building DRA artifacts even if there is flakiness in mandatory tests
if: build.env("BUILDKITE_PULL_REQUEST") != "false"
depends_on:
- step: "x-pack-filebeat-mandatory-tests"
- group: "Packaging"
key: "x-pack-filebeat-packaging"
steps:
- label: ":linux: x-pack/filebeat: Packaging Linux"
key: "packaging-linux"
env:
PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
command: |
cd x-pack/filebeat
mage package
retry:
automatic:
- limit: 1
timeout_in_minutes: 20
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
notify:
- github_commit_status:
context: "x-pack/filebeat: Packaging Linux"
- label: ":linux: x-pack/filebeat: Packaging arm64"
key: "packaging-arm"
env:
PLATFORMS: "linux/arm64"
PACKAGES: "docker"
command: |
cd x-pack/filebeat
mage package
retry:
automatic:
- limit: 1
timeout_in_minutes: 20
agents:
provider: "aws"
imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
notify:
- github_commit_status:
context: "x-pack/filebeat: Packaging Linux arm64"