@@ -37,193 +37,287 @@ jobs:
37
37
38
38
# Filebeat
39
39
- os : linux
40
- env : TARGETS="-C filebeat testsuite"
40
+ before_install : .ci/scripts/travis_has_changes.sh filebeat libbeat || travis_terminate 0
41
+ env :
42
+ - PROJECT=filebeat
43
+ - MAGE='build test'
41
44
go : $TRAVIS_GO_VERSION
42
45
stage : test
43
46
- os : osx
44
- env : TARGETS="TEST_ENVIRONMENT=0 -C filebeat testsuite"
47
+ before_install : .ci/scripts/travis_has_changes.sh filebeat libbeat || travis_terminate 0
48
+ env :
49
+ - PROJECT=filebeat
50
+ - MAGE='build unitTest'
45
51
go : $TRAVIS_GO_VERSION
46
52
stage : test
47
53
- os : linux
48
- env : TARGETS="-C x-pack/filebeat testsuite"
54
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/filebeat filebeat libbeat || travis_terminate 0
55
+ env :
56
+ - PROJECT=x-pack/filebeat
57
+ - MAGE='build test'
49
58
go : $(GO_VERSION)
50
59
stage : test
51
60
52
61
# Heartbeat
53
62
- os : linux
54
- env : TARGETS="-C heartbeat testsuite"
63
+ before_install : .ci/scripts/travis_has_changes.sh heartbeat libbeat || travis_terminate 0
64
+ env :
65
+ - PROJECT=heartbeat
66
+ - MAGE='build test'
55
67
go : $TRAVIS_GO_VERSION
56
68
stage : test
57
69
- os : osx
58
- env : TARGETS="TEST_ENVIRONMENT=0 -C heartbeat testsuite"
70
+ before_install : .ci/scripts/travis_has_changes.sh heartbeat libbeat || travis_terminate 0
71
+ env :
72
+ - PROJECT=heartbeat
73
+ - MAGE='build unitTest'
59
74
go : $TRAVIS_GO_VERSION
60
75
stage : test
61
76
62
77
# Auditbeat
63
78
- os : linux
64
- env : TARGETS="-C auditbeat testsuite"
79
+ before_install : .ci/scripts/travis_has_changes.sh auditbeat libbeat || travis_terminate 0
80
+ env :
81
+ - PROJECT=auditbeat
82
+ - MAGE='build test'
65
83
go : $TRAVIS_GO_VERSION
66
84
stage : test
67
85
- os : osx
68
- env : TARGETS="TEST_ENVIRONMENT=0 -C auditbeat testsuite"
86
+ before_install : .ci/scripts/travis_has_changes.sh auditbeat libbeat || travis_terminate 0
87
+ env :
88
+ - PROJECT=auditbeat
89
+ - MAGE='build unitTest'
69
90
go : $TRAVIS_GO_VERSION
70
91
stage : test
71
92
- os : linux
93
+ before_install : .ci/scripts/travis_has_changes.sh auditbeat libbeat || travis_terminate 0
72
94
env : TARGETS="-C auditbeat crosscompile"
73
95
go : $TRAVIS_GO_VERSION
74
96
stage : test
75
97
- os : linux
76
- env : TARGETS="-C x-pack/auditbeat testsuite"
98
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/auditbeat auditbeat libbeat || travis_terminate 0
99
+ env :
100
+ - PROJECT=x-pack/auditbeat
101
+ - MAGE='build test'
102
+ go : $TRAVIS_GO_VERSION
103
+ stage : test
104
+ - os : osx
105
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/auditbeat auditbeat libbeat || travis_terminate 0
106
+ env :
107
+ - PROJECT=x-pack/auditbeat
108
+ - MAGE='build unitTest'
77
109
go : $TRAVIS_GO_VERSION
78
110
stage : test
79
111
80
112
# Libbeat
81
113
- os : linux
82
- env : TARGETS="-C libbeat testsuite"
114
+ before_install : .ci/scripts/travis_has_changes.sh libbeat || travis_terminate 0
115
+ env :
116
+ - PROJECT=libbeat
117
+ - MAGE='build test'
118
+ # The libbeat tests are so verbose that they exceed the maximum allowed log length of Travis CI.
119
+ - MAGEFILE_VERBOSE=false
83
120
go : $TRAVIS_GO_VERSION
84
121
stage : test
85
122
- os : linux
123
+ before_install : .ci/scripts/travis_has_changes.sh libbeat || travis_terminate 0
86
124
env : TARGETS="-C libbeat crosscompile"
87
125
go : $TRAVIS_GO_VERSION
88
126
stage : test
89
127
- os : linux
128
+ before_install : .ci/scripts/travis_has_changes.sh libbeat || travis_terminate 0
90
129
env : STRESS_TEST_OPTIONS="-timeout=20m -race -v -parallel 1" TARGETS="-C libbeat stress-tests"
91
130
go : $TRAVIS_GO_VERSION
92
131
stage : test
93
132
- os : linux
94
- env : TARGETS="-C x-pack/libbeat testsuite"
133
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/libbeat libbeat || travis_terminate 0
134
+ env :
135
+ - PROJECT=x-pack/libbeat
136
+ - MAGE='build test'
95
137
go : $TRAVIS_GO_VERSION
96
138
stage : test
97
139
98
140
# Metricbeat
99
141
- os : linux
100
- env : TARGETS="-C metricbeat unit-tests"
142
+ before_install : .ci/scripts/travis_has_changes.sh metricbeat libbeat || travis_terminate 0
143
+ env :
144
+ - PROJECT=metricbeat
145
+ - MAGE='build unitTest'
101
146
go : $TRAVIS_GO_VERSION
102
147
stage : test
103
148
- os : linux
104
149
before_install : .ci/scripts/travis_has_changes.sh metricbeat libbeat || travis_terminate 0
105
- install :
150
+ install :
106
151
- .ci/scripts/install-kind.sh
107
152
- .ci/scripts/install-kubectl.sh
108
153
env :
109
- - TARGETS="-C metricbeat integration-tests"
110
154
- K8S_VERSION=v1.17.2
111
155
- KIND_VERSION=v0.7.0
156
+ - PROJECT=metricbeat
157
+ - MAGE='goIntegTest'
112
158
go : $TRAVIS_GO_VERSION
113
159
stage : test
114
160
- os : linux
115
- env : TARGETS="-C metricbeat system-tests"
161
+ before_install : .ci/scripts/travis_has_changes.sh metricbeat libbeat || travis_terminate 0
162
+ env :
163
+ - PROJECT=metricbeat
164
+ - MAGE='pythonIntegTest'
116
165
go : $TRAVIS_GO_VERSION
117
166
stage : test
118
167
- os : osx
119
- env : TARGETS="-C metricbeat testsuite"
168
+ before_install : .ci/scripts/travis_has_changes.sh metricbeat libbeat || travis_terminate 0
169
+ env :
170
+ - PROJECT=metricbeat
171
+ - MAGE='build unitTest'
120
172
go : $TRAVIS_GO_VERSION
121
173
stage : test
122
174
- os : linux
175
+ before_install : .ci/scripts/travis_has_changes.sh metricbeat libbeat || travis_terminate 0
123
176
env : TARGETS="-C metricbeat crosscompile"
124
177
go : $TRAVIS_GO_VERSION
125
178
stage : test
126
179
- os : linux
127
- env : TARGETS="-C x-pack/metricbeat unit-tests"
180
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/metricbeat metricbeat libbeat || travis_terminate 0
181
+ env :
182
+ - PROJECT=x-pack/metricbeat
183
+ - MAGE='build unitTest'
128
184
go : $TRAVIS_GO_VERSION
129
185
stage : test
130
186
- os : linux
131
- env : TARGETS="-C x-pack/metricbeat integration-tests"
187
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/metricbeat metricbeat libbeat || travis_terminate 0
188
+ env :
189
+ - PROJECT=x-pack/metricbeat
190
+ - MAGE='goIntegTest'
132
191
go : $TRAVIS_GO_VERSION
133
192
stage : test
134
193
- os : linux
135
- env : TARGETS="-C x-pack/metricbeat system-tests"
194
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/metricbeat metricbeat libbeat || travis_terminate 0
195
+ env :
196
+ - PROJECT=x-pack/metricbeat
197
+ - MAGE='pythonIntegTest'
136
198
go : $TRAVIS_GO_VERSION
137
199
stage : test
138
200
- os : osx
139
- env : TARGETS="-C x-pack/metricbeat testsuite"
201
+ before_install : .ci/scripts/travis_has_changes.sh metricbeat libbeat || travis_terminate 0
202
+ env :
203
+ - PROJECT=x-pack/metricbeat
204
+ - MAGE='build unitTest'
140
205
go : $TRAVIS_GO_VERSION
141
206
stage : test
142
207
143
208
# Packetbeat
144
209
- os : linux
145
- env : TARGETS="-C packetbeat testsuite"
210
+ before_install : .ci/scripts/travis_has_changes.sh packetbeat libbeat || travis_terminate 0
211
+ env :
212
+ - PROJECT=packetbeat
213
+ - MAGE='build test'
146
214
go : $TRAVIS_GO_VERSION
147
215
stage : test
148
216
149
217
# Winlogbeat
150
218
- os : linux
219
+ before_install : .ci/scripts/travis_has_changes.sh winlogbeat libbeat || travis_terminate 0
151
220
env : TARGETS="-C winlogbeat crosscompile"
152
221
go : $TRAVIS_GO_VERSION
153
222
stage : test
154
223
155
224
# Functionbeat
156
225
- os : linux
157
- env : TARGETS="-C x-pack/functionbeat testsuite"
226
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/functionbeat libbeat || travis_terminate 0
227
+ env :
228
+ - PROJECT=x-pack/functionbeat
229
+ - MAGE='build test'
158
230
go : $TRAVIS_GO_VERSION
159
231
stage : test
160
232
- os : osx
161
- env : TARGETS="TEST_ENVIRONMENT=0 -C x-pack/functionbeat testsuite"
233
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/functionbeat libbeat || travis_terminate 0
234
+ env :
235
+ - PROJECT=x-pack/functionbeat
236
+ - MAGE='build unitTest'
162
237
go : $TRAVIS_GO_VERSION
163
238
stage : test
164
239
- os : linux
165
240
before_install : .ci/scripts/travis_has_changes.sh x-pack/functionbeat libbeat || travis_terminate 0
166
- env : TARGETS="-C x-pack/functionbeat test-gcp-functions"
241
+ env :
242
+ - PROJECT=x-pack/functionbeat
243
+ - MAGE='testGCPFunctions'
167
244
go : 1.13.1
168
245
stage : test
169
246
170
247
# Docker Log Driver
171
248
- os : linux
172
- env : TARGETS="-C x-pack/dockerlogbeat testsuite"
249
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/dockerlogbeat libbeat || travis_terminate 0
250
+ env :
251
+ - PROJECT=x-pack/dockerlogbeat
252
+ - MAGE='build test'
173
253
go : $TRAVIS_GO_VERSION
174
254
stage : test
175
255
176
256
# Journalbeat
177
257
- os : linux
178
- env : TARGETS="-C journalbeat testsuite"
258
+ before_install : .ci/scripts/travis_has_changes.sh journalbeat libbeat || travis_terminate 0
259
+ env :
260
+ - PROJECT=journalbeat
261
+ - MAGE='build goUnitTest'
179
262
go : $TRAVIS_GO_VERSION
180
263
stage : test
181
264
182
265
# Agent
183
266
- os : linux
184
267
before_install : .ci/scripts/travis_has_changes.sh x-pack/elastic-agent libbeat || travis_terminate 0
185
- env : TARGETS="-C x-pack/elastic-agent testsuite"
268
+ env :
269
+ - PROJECT=x-pack/elastic-agent
270
+ - MAGE='build test'
186
271
go : $TRAVIS_GO_VERSION
187
272
stage : test
188
273
- os : osx
189
274
before_install : .ci/scripts/travis_has_changes.sh x-pack/elastic-agent libbeat || travis_terminate 0
190
- env : TARGETS="TEST_ENVIRONMENT=0 -C x-pack/elastic-agent testsuite"
275
+ env :
276
+ - PROJECT=x-pack/elastic-agent
277
+ - MAGE='build unitTest'
191
278
go : $TRAVIS_GO_VERSION
192
279
stage : test
193
280
194
281
# Generators
195
282
- os : linux
283
+ before_install : .ci/scripts/travis_has_changes.sh generator metricbeat libbeat || travis_terminate 0
196
284
env : TARGETS="-C generator/_templates/metricbeat test test-package"
197
285
go : $TRAVIS_GO_VERSION
198
286
stage : test
199
287
- os : linux
288
+ before_install : .ci/scripts/travis_has_changes.sh generator libbeat || travis_terminate 0
200
289
env : TARGETS="-C generator/_templates/beat test test-package"
201
290
go : $TRAVIS_GO_VERSION
202
291
stage : test
203
292
204
293
- os : osx
294
+ before_install : .ci/scripts/travis_has_changes.sh generator metricbeat libbeat || travis_terminate 0
205
295
env : TARGETS="-C generator/_templates/metricbeat test"
206
296
go : $TRAVIS_GO_VERSION
207
297
stage : test
208
298
- os : osx
299
+ before_install : .ci/scripts/travis_has_changes.sh generator libbeat || travis_terminate 0
209
300
env : TARGETS="-C generator/_templates/beat test"
210
301
go : $TRAVIS_GO_VERSION
211
302
stage : test
212
303
213
304
# Kubernetes
214
305
- os : linux
306
+ before_install : .ci/scripts/travis_has_changes.sh deploy/kubernetes metricbeat filebeat libbeat || travis_terminate 0
215
307
install : deploy/kubernetes/.travis/setup.sh
216
308
env :
217
309
- TARGETS="-C deploy/kubernetes test"
218
310
- TRAVIS_K8S_VERSION=v1.9.4
219
311
stage : test
220
312
- os : linux
313
+ before_install : .ci/scripts/travis_has_changes.sh deploy/kubernetes metricbeat filebeat libbeat || travis_terminate 0
221
314
install : deploy/kubernetes/.travis/setup.sh
222
315
env :
223
316
- TARGETS="-C deploy/kubernetes test"
224
317
- TRAVIS_K8S_VERSION=v1.10.0
225
318
stage : test
226
319
- os : linux
320
+ before_install : .ci/scripts/travis_has_changes.sh deploy/kubernetes metricbeat filebeat libbeat || travis_terminate 0
227
321
dist : xenial
228
322
install : deploy/kubernetes/.travis/setup.sh
229
323
env :
@@ -267,7 +361,12 @@ addons:
267
361
- python3.6
268
362
- python3.6-venv
269
363
270
- before_install :
364
+
365
+
366
+ # Skips installations step
367
+ install : true
368
+
369
+ before_script :
271
370
- if [ x$TRAVIS_DIST = xtrusty ]; then sudo ln -sf python3.6 /usr/bin/python3; fi
272
371
- python --version
273
372
- python3 --version
@@ -279,17 +378,21 @@ before_install:
279
378
- chmod +x docker-compose
280
379
- sudo mv docker-compose /usr/local/bin
281
380
- if [ $TRAVIS_OS_NAME = osx ]; then pip install virtualenv==16.7.9; fi
282
-
283
-
284
- # Skips installations step
285
- install : true
381
+ - make mage
286
382
287
383
script :
288
384
# Replacement for travis_wait which doesn't print output in real time.
289
385
# Default Travis timeout is 10min, so this workaround prints timestamps every 9min to reset the counter.
290
386
# Using seconds (540s = 9min) instead of minutes for shell compatibility reasons.
291
387
- while sleep 540; do echo "=====[ ${SECONDS} seconds still running ]====="; done &
292
- - make $TARGETS
388
+ - if [[ -n "$MAGE" ]]; then
389
+ echo ">> mage $MAGE from $PROJECT";
390
+ cd "$PROJECT";
391
+ mage $MAGE;
392
+ else
393
+ echo ">> make $TARGETS";
394
+ make $TARGETS;
395
+ fi
293
396
- kill %1
294
397
295
398
notifications :
0 commit comments