forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
87 lines (75 loc) · 2.94 KB
/
.travis.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
sudo: required
dist: trusty
services:
- docker
language: go
go:
- 1.5.3
os:
- linux
- osx
env:
matrix:
- TARGETS="check"
- TARGETS="-C libbeat testsuite"
- TARGETS="-C topbeat testsuite"
- TARGETS="-C filebeat testsuite"
- TARGETS="-C winlogbeat testsuite"
- TARGETS="-C packetbeat testsuite"
- TARGETS="-C libbeat crosscompile"
- TARGETS="-C winlogbeat crosscompile"
global:
# Cross-compile for amd64 only to speed up testing.
- GOX_FLAGS="-arch amd64"
matrix:
exclude:
- os: osx
env: TARGETS="check"
- os: osx
env: TARGETS="-C filebeat crosscompile"
- os: osx
env: TARGETS="-C libbeat crosscompile"
- os: osx
env: TARGETS="-C winlogbeat testsuite"
- os: osx
env: TARGETS="-C winlogbeat crosscompile"
- os: osx
env: TARGETS="-C libbeat testsuite"
fast_finish: true
allow_failures:
- env: TARGETS="-C libbeat crosscompile"
- env: TARGETS="-C filebeat crosscompile"
addons:
apt:
packages:
- python-virtualenv
- libpcap-dev
- geoip-database
before_install:
# Temporary work-around a travis bug https://github.com/travis-ci/travis-ci/issues/5285
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl -O http://cz.archive.ubuntu.com/ubuntu/pool/main/libp/libpcap/libpcap0.8-dev_1.5.3-2_amd64.deb; sudo dpkg -i libpcap0.8-dev_1.5.3-2_amd64.deb; fi
#- sudo apt-get install libpcap-dev
# Redo the travis setup but with the elastic/libbeat path. This is needed so the package path is correct
- mkdir -p $HOME/gopath/src/github.com/elastic/beats/
- rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/github.com/elastic/beats/
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/elastic/beats/
- cd $HOME/gopath/src/github.com/elastic/beats/
# Docker-compose installation
- curl -L https://github.com/docker/compose/releases/download/1.4.0/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
install:
- true
script:
- make $TARGETS
notifications:
slack:
rooms:
secure: "e25J5puEA31dOooTI4T+K+zrTs8XeWIGq2cgmiPt9u/g7eqWeQj1UJnVsr8GOu1RPDyuJZJHXqfrvuOYJTdHzXbwjD0JTbwwVVZMkkZW2SWZHG46HCXPiucjWXEr3hXJKBJDDpIx6VxrN7r17dejv1biQ8QuEFZfiB1H8kbH/ho="
after_success:
# Copy full.cov to coverage.txt because codecov.io requires this file
- test -f filebeat/build/coverage/full.cov && bash <(curl -s https://codecov.io/bash) -f filebeat/build/coverage/full.cov
- test -f packetbeat/build/coverage/full.cov && bash <(curl -s https://codecov.io/bash) -f packetbeat/build/coverage/full.cov
- test -f topbeat/build/coverage/full.cov && bash <(curl -s https://codecov.io/bash) -f topbeat/build/coverage/full.cov
- test -f libbeat/build/coverage/full.cov && bash <(curl -s https://codecov.io/bash) -f libbeat/build/coverage/full.cov
- test -f winlogbeat/build/coverage/full.cov && bash <(curl -s https://codecov.io/bash) -f winlogbeat/build/coverage/full.cov