-
Notifications
You must be signed in to change notification settings - Fork 4.9k
/
Copy pathpipeline.xpack.winlogbeat.yml
218 lines (202 loc) · 7.22 KB
/
pipeline.xpack.winlogbeat.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
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
name: "beats-xpack-winlogbeat"
env:
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"
GCP_WIN_MACHINE_TYPE: "n2-standard-8"
GCP_HI_PERF_MACHINE_TYPE: "c2d-highcpu-16"
# Other deps
ASDF_MAGE_VERSION: 1.15.0
# Unit tests
RACE_DETECTOR: "true"
TEST_COVERAGE: "true"
steps:
- group: "Check/Update"
key: "x-pack-winlogbeat-check-update"
steps:
- label: "x-pack/winlogbeat: Run check/update"
command: |
set -eo pipefail
make -C x-pack/winlogbeat check update
make check-no-changes
retry:
automatic:
- limit: 1
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:latest"
cpu: "4000m"
memory: "8Gi"
useCustomGlobalHooks: true
notify:
- github_commit_status:
context: "x-pack/winlogbeat: check/update"
- 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-winlogbeat-check-update"
- group: "Mandatory Tests"
key: "x-pack-winlogbeat-mandatory-tests"
steps:
- label: ":windows: x-pack/winlogbeat Win 2019 Unit (MODULE) Tests"
key: "mandatory-win-2019-module-unit-tests"
command: |
Import-Module ./.buildkite/scripts/changesets.psm1
defineModuleFromTheChangeSet 'x-pack/winlogbeat'
Write-Output "~~~ Running tests"
Set-Location -Path x-pack/winlogbeat
mage build unitTest
retry:
automatic:
- limit: 1
agents:
provider: "gcp"
image: "${IMAGE_WIN_2019}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths:
- "x-pack/winlogbeat/build/*.xml"
- "x-pack/winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "x-pack/winlogbeat Win 2019 Unit (MODULE) Tests"
- label: ":windows: x-pack/winlogbeat: Win 2016 Unit Tests"
command: |
Set-Location -Path x-pack/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:
- "x-pack/winlogbeat/build/*.xml"
- "x-pack/winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "x-pack/winlogbeat: Win 2016 Unit Tests"
- label: ":windows: x-pack/winlogbeat: Win 2022 Unit Tests"
command: |
Set-Location -Path x-pack/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:
- "x-pack/winlogbeat/build/*.xml"
- "x-pack/winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "x-pack/winlogbeat: Win 2022 Unit Tests"
- group: "Extended Windows Tests"
key: "extended-win-tests"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*[Ww]indows.*/
steps:
- label: ":windows: x-pack/winlogbeat: Win 10 Unit Tests"
command: |
Set-Location -Path x-pack/winlogbeat
mage build unitTest
key: "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/winlogbeat/build/*.xml"
- "x-pack/winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "x-pack/winlogbeat: Win 10 Unit Tests"
- label: ":windows: x-pack/winlogbeat: Win 11 Unit Tests"
command: |
Set-Location -Path x-pack/winlogbeat
mage build unitTest
key: "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/winlogbeat/build/*.xml"
- "x-pack/winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "x-pack/winlogbeat: Win 11 Unit Tests"
- label: ":windows: x-pack/winlogbeat: Win 2019 Unit Tests"
command: |
Set-Location -Path x-pack/winlogbeat
mage build unitTest
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:
- "x-pack/winlogbeat/build/*.xml"
- "x-pack/winlogbeat/build/*.json"
notify:
- github_commit_status:
context: "x-pack/winlogbeat: Win 2019 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:
- "x-pack-winlogbeat-mandatory-tests"
- group: "Packaging"
key: "x-pack-winlogbeat-packaging"
steps:
- label: ":ubuntu: x-pack/winlogbeat: Packaging Linux"
key: "packaging-linux"
env:
PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
command: |
cd x-pack/winlogbeat
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/winlogbeat: Packaging Linux"