@@ -37,49 +37,85 @@ 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
72
93
env : TARGETS="-C auditbeat crosscompile"
73
94
go : $TRAVIS_GO_VERSION
74
95
stage : test
75
96
- os : linux
76
- env : TARGETS="-C x-pack/auditbeat testsuite"
97
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/auditbeat auditbeat libbeat || travis_terminate 0
98
+ env :
99
+ - PROJECT=x-pack/auditbeat
100
+ - MAGE='build test'
101
+ go : $TRAVIS_GO_VERSION
102
+ stage : test
103
+ - os : osx
104
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/auditbeat auditbeat libbeat || travis_terminate 0
105
+ env :
106
+ - PROJECT=x-pack/auditbeat
107
+ - MAGE='build unitTest'
77
108
go : $TRAVIS_GO_VERSION
78
109
stage : test
79
110
80
111
# Libbeat
81
112
- os : linux
82
- env : TARGETS="-C libbeat testsuite"
113
+ before_install : .ci/scripts/travis_has_changes.sh libbeat || travis_terminate 0
114
+ env :
115
+ - PROJECT=libbeat
116
+ - MAGE='build test'
117
+ # The libbeat tests are so verbose that they exceed the maximum allowed log length of Travis CI.
118
+ - MAGEFILE_VERBOSE=false
83
119
go : $TRAVIS_GO_VERSION
84
120
stage : test
85
121
- os : linux
@@ -91,58 +127,86 @@ jobs:
91
127
go : $TRAVIS_GO_VERSION
92
128
stage : test
93
129
- os : linux
94
- env : TARGETS="-C x-pack/libbeat testsuite"
130
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/libbeat libbeat || travis_terminate 0
131
+ env :
132
+ - PROJECT=x-pack/libbeat
133
+ - MAGE='build test'
95
134
go : $TRAVIS_GO_VERSION
96
135
stage : test
97
136
98
137
# Metricbeat
99
138
- os : linux
100
- env : TARGETS="-C metricbeat unit-tests"
139
+ before_install : .ci/scripts/travis_has_changes.sh metricbeat libbeat || travis_terminate 0
140
+ env :
141
+ - PROJECT=metricbeat
142
+ - MAGE='build unitTest'
101
143
go : $TRAVIS_GO_VERSION
102
144
stage : test
103
145
- os : linux
104
146
before_install : .ci/scripts/travis_has_changes.sh metricbeat libbeat || travis_terminate 0
105
- install :
147
+ install :
106
148
- .ci/scripts/install-kind.sh
107
149
- .ci/scripts/install-kubectl.sh
108
150
env :
109
- - TARGETS="-C metricbeat integration-tests"
110
151
- K8S_VERSION=v1.17.2
111
152
- KIND_VERSION=v0.7.0
153
+ - PROJECT=metricbeat
154
+ - MAGE='goIntegTest'
112
155
go : $TRAVIS_GO_VERSION
113
156
stage : test
114
157
- os : linux
115
- env : TARGETS="-C metricbeat system-tests"
158
+ before_install : .ci/scripts/travis_has_changes.sh metricbeat libbeat || travis_terminate 0
159
+ env :
160
+ - PROJECT=metricbeat
161
+ - MAGE='pythonIntegTest'
116
162
go : $TRAVIS_GO_VERSION
117
163
stage : test
118
164
- os : osx
119
- env : TARGETS="-C metricbeat testsuite"
165
+ before_install : .ci/scripts/travis_has_changes.sh metricbeat libbeat || travis_terminate 0
166
+ env :
167
+ - PROJECT=metricbeat
168
+ - MAGE='build unitTest'
120
169
go : $TRAVIS_GO_VERSION
121
170
stage : test
122
171
- os : linux
123
172
env : TARGETS="-C metricbeat crosscompile"
124
173
go : $TRAVIS_GO_VERSION
125
174
stage : test
126
175
- os : linux
127
- env : TARGETS="-C x-pack/metricbeat unit-tests"
176
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/metricbeat metricbeat libbeat || travis_terminate 0
177
+ env :
178
+ - PROJECT=x-pack/metricbeat
179
+ - MAGE='build unitTest'
128
180
go : $TRAVIS_GO_VERSION
129
181
stage : test
130
182
- os : linux
131
- env : TARGETS="-C x-pack/metricbeat integration-tests"
183
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/metricbeat metricbeat libbeat || travis_terminate 0
184
+ env :
185
+ - PROJECT=x-pack/metricbeat
186
+ - MAGE='goIntegTest'
132
187
go : $TRAVIS_GO_VERSION
133
188
stage : test
134
189
- os : linux
135
- env : TARGETS="-C x-pack/metricbeat system-tests"
190
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/metricbeat metricbeat libbeat || travis_terminate 0
191
+ env :
192
+ - PROJECT=x-pack/metricbeat
193
+ - MAGE='pythonIntegTest'
136
194
go : $TRAVIS_GO_VERSION
137
195
stage : test
138
196
- os : osx
139
- env : TARGETS="-C x-pack/metricbeat testsuite"
197
+ before_install : .ci/scripts/travis_has_changes.sh metricbeat libbeat || travis_terminate 0
198
+ env :
199
+ - PROJECT=x-pack/metricbeat
200
+ - MAGE='build unitTest'
140
201
go : $TRAVIS_GO_VERSION
141
202
stage : test
142
203
143
204
# Packetbeat
144
205
- os : linux
145
- env : TARGETS="-C packetbeat testsuite"
206
+ before_install : .ci/scripts/travis_has_changes.sh packetbeat libbeat || travis_terminate 0
207
+ env :
208
+ - PROJECT=packetbeat
209
+ - MAGE='build test'
146
210
go : $TRAVIS_GO_VERSION
147
211
stage : test
148
212
@@ -154,40 +218,58 @@ jobs:
154
218
155
219
# Functionbeat
156
220
- os : linux
157
- env : TARGETS="-C x-pack/functionbeat testsuite"
221
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/functionbeat libbeat || travis_terminate 0
222
+ env :
223
+ - PROJECT=x-pack/functionbeat
224
+ - MAGE='build test'
158
225
go : $TRAVIS_GO_VERSION
159
226
stage : test
160
227
- os : osx
161
- env : TARGETS="TEST_ENVIRONMENT=0 -C x-pack/functionbeat testsuite"
228
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/functionbeat libbeat || travis_terminate 0
229
+ env :
230
+ - PROJECT=x-pack/functionbeat
231
+ - MAGE='build unitTest'
162
232
go : $TRAVIS_GO_VERSION
163
233
stage : test
164
234
- os : linux
165
235
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"
236
+ env :
237
+ - PROJECT=x-pack/functionbeat
238
+ - MAGE='testGCPFunctions'
167
239
go : 1.13.1
168
240
stage : test
169
241
170
242
# Docker Log Driver
171
243
- os : linux
172
- env : TARGETS="-C x-pack/dockerlogbeat testsuite"
244
+ before_install : .ci/scripts/travis_has_changes.sh x-pack/dockerlogbeat libbeat || travis_terminate 0
245
+ env :
246
+ - PROJECT=x-pack/dockerlogbeat
247
+ - MAGE='build test'
173
248
go : $TRAVIS_GO_VERSION
174
249
stage : test
175
250
176
251
# Journalbeat
177
252
- os : linux
178
- env : TARGETS="-C journalbeat testsuite"
253
+ before_install : .ci/scripts/travis_has_changes.sh journalbeat libbeat || travis_terminate 0
254
+ env :
255
+ - PROJECT=journalbeat
256
+ - MAGE='build goUnitTest'
179
257
go : $TRAVIS_GO_VERSION
180
258
stage : test
181
259
182
260
# Agent
183
261
- os : linux
184
262
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"
263
+ env :
264
+ - PROJECT=x-pack/elastic-agent
265
+ - MAGE='build test'
186
266
go : $TRAVIS_GO_VERSION
187
267
stage : test
188
268
- os : osx
189
269
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"
270
+ env :
271
+ - PROJECT=x-pack/elastic-agent
272
+ - MAGE='build unitTest'
191
273
go : $TRAVIS_GO_VERSION
192
274
stage : test
193
275
@@ -279,6 +361,7 @@ before_install:
279
361
- chmod +x docker-compose
280
362
- sudo mv docker-compose /usr/local/bin
281
363
- if [ $TRAVIS_OS_NAME = osx ]; then pip install virtualenv==16.7.9; fi
364
+ - make mage
282
365
283
366
284
367
# Skips installations step
@@ -289,7 +372,14 @@ script:
289
372
# Default Travis timeout is 10min, so this workaround prints timestamps every 9min to reset the counter.
290
373
# Using seconds (540s = 9min) instead of minutes for shell compatibility reasons.
291
374
- while sleep 540; do echo "=====[ ${SECONDS} seconds still running ]====="; done &
292
- - make $TARGETS
375
+ - if [[ -n "$MAGE" ]]; then
376
+ echo ">> mage $MAGE from $PROJECT";
377
+ cd "$PROJECT";
378
+ mage $MAGE;
379
+ else
380
+ echo ">> make $TARGETS";
381
+ make $TARGETS;
382
+ fi
293
383
- kill %1
294
384
295
385
notifications :
0 commit comments