-
Notifications
You must be signed in to change notification settings - Fork 5k
Expand file tree
/
Copy pathpipeline.winlogbeat.yml
More file actions
270 lines (247 loc) · 8.84 KB
/
Copy pathpipeline.winlogbeat.yml
File metadata and controls
270 lines (247 loc) · 8.84 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
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
name: "beats-winlogbeat"
env:
AWS_ARM_INSTANCE_TYPE: "m6g.xlarge"
AWS_IMAGE_UBUNTU_ARM_64: "platform-ingest-beats-ubuntu-2204-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_WIN_2025: "platform-ingest-beats-windows-2025-1782878510"
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"
# See docker.go. Sets --pull to docker compose
DOCKER_PULL: 0
# This section is used to define the plugins that will be used in the pipeline.
# See https://buildkite.com/docs/pipelines/integrations/plugins/using#using-yaml-anchors-with-plugins
common:
- dockerhub_login_plugin: &dockerhub_login_plugin
elastic/vault-docker-login#v0.8.0:
disable_logout: true
secret_path: 'kv/ci-shared/observability-github-secrets/shared/docker/dockerhub/observabilityrobots'
- docker_elastic_login_plugin: &docker_elastic_login_plugin
elastic/vault-docker-login#v0.8.0:
disable_logout: true
secret_path: 'kv/ci-shared/platform-ingest/elastic_docker_registry'
steps:
- group: "Check/Update"
key: "winlogbeat-check-update"
steps:
- label: "Winlogbeat: Run check/update"
command: |
set -eo pipefail
make -C winlogbeat 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: "winlogbeat: check/update"
- label: "Winlogbeat: 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: "winlogbeat: 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: "winlogbeat-check-update"
- group: "Mandatory Tests"
key: "winlogbeat-mandatory-tests"
steps:
- label: ":windows: Winlogbeat: Win 2016 Unit Tests"
command: |
Set-Location -Path winlogbeat
mage build unitTest
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:
- "winlogbeat/build/*.xml"
- "winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "winlogbeat: Win 2016 Unit Tests"
- label: ":windows: Winlogbeat: Win 2019 Unit Tests"
command: |
Set-Location -Path winlogbeat
mage build unitTest
key: "mandatory-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:
- "winlogbeat/build/*.xml"
- "winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "winlogbeat: Win 2019 Unit Tests"
- label: ":windows: Winlogbeat: Win 2022 Unit Tests"
command: |
Set-Location -Path winlogbeat
mage build unitTest
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:
- "winlogbeat/build/*.xml"
- "winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "winlogbeat: Win 2022 Unit Tests"
- label: ":windows: Winlogbeat: Win 2025 Unit Tests"
command: |
Set-Location -Path winlogbeat
mage build unitTest
key: "mandatory-win-2025-unit-tests"
retry:
automatic:
- limit: 1
agents:
provider: "gcp"
image: "${IMAGE_WIN_2025}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths:
- "winlogbeat/build/*.xml"
- "winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "winlogbeat: Win 2025 Unit Tests"
- group: "Extended Windows Tests"
key: "winlogbeat-extended-win-tests"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*[Ww]indows.*/
steps:
- label: ":windows: Winlogbeat: Win 10 Unit Tests"
command: |
Set-Location -Path winlogbeat
mage build unitTest
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:
- "winlogbeat/build/*.xml"
- "winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "winlogbeat: Win 10 Unit Tests"
- label: ":windows: Winlogbeat: Win 11 Unit Tests"
command: |
Set-Location -Path winlogbeat
mage build unitTest
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:
- "winlogbeat/build/*.xml"
- "winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "winlogbeat: Win 11 Unit 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: "winlogbeat-mandatory-tests"
- group: "Packaging"
key: "winlogbeat-packaging"
steps:
- label: ":ubuntu: Winlogbeat: Packaging Linux"
key: "packaging-linux"
env:
PLATFORMS: "+all linux/amd64 windows/amd64 darwin/amd64"
command: |
.buildkite/scripts/packaging/packaging.sh winlogbeat
retry:
automatic:
- limit: 1
timeout_in_minutes: 20
plugins:
- *dockerhub_login_plugin
- *docker_elastic_login_plugin
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"
notify:
- github_commit_status:
context: "winlogbeat: Packaging Linux"
- label: ":ubuntu: Winlogbeat: Packaging Windows arm64"
key: "winlogbeat-packaging-arm"
env:
PLATFORMS: "+all windows/arm64"
command: |
.buildkite/scripts/packaging/packaging.sh winlogbeat
retry:
automatic:
- limit: 1
timeout_in_minutes: 20
plugins:
- *dockerhub_login_plugin
- *docker_elastic_login_plugin
agents:
provider: "aws"
image: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
notify:
- github_commit_status:
context: "winlogbeat: Packaging Linux arm64"