icingabeat/vendor/github.com/elastic/beats/.travis.yml

157 lines
4.3 KiB
YAML
Raw Normal View History

sudo: required
dist: trusty
services:
- docker
language: go
# Make sure project can also be built on travis for clones of the repo
go_import_path: github.com/elastic/beats
env:
global:
# Cross-compile for amd64 only to speed up testing.
- GOX_FLAGS="-arch amd64"
2017-12-19 13:16:39 +01:00
- DOCKER_COMPOSE_VERSION=1.11.1
2017-12-18 10:56:10 +01:00
- GO_VERSION="$(cat .go-version)"
2017-12-19 13:16:39 +01:00
- TRAVIS_ETCD_VERSION=v3.2.8
2017-12-19 13:16:39 +01:00
jobs:
2017-03-15 09:54:31 +01:00
include:
# General checks
- os: linux
env: TARGETS="check"
2017-12-18 10:56:10 +01:00
go: $GO_VERSION
2017-12-19 13:16:39 +01:00
stage: check
2017-03-15 09:54:31 +01:00
# Filebeat
- os: linux
env: TARGETS="-C filebeat testsuite"
2017-12-18 10:56:10 +01:00
go: $GO_VERSION
2017-12-19 13:16:39 +01:00
stage: test
- os: osx
2017-03-15 09:54:31 +01:00
env: TARGETS="TEST_ENVIRONMENT=0 -C filebeat testsuite"
2017-12-18 10:56:10 +01:00
go: $GO_VERSION
2017-12-19 13:16:39 +01:00
stage: test
2017-03-15 09:54:31 +01:00
# Heartbeat
- os: linux
env: TARGETS="-C heartbeat testsuite"
2017-12-18 10:56:10 +01:00
go: $GO_VERSION
2017-12-19 13:16:39 +01:00
stage: test
- os: osx
2017-03-15 09:54:31 +01:00
env: TARGETS="TEST_ENVIRONMENT=0 -C heartbeat testsuite"
2017-12-18 10:56:10 +01:00
go: $GO_VERSION
2017-12-19 13:16:39 +01:00
stage: test
# Auditbeat
- os: linux
env: TARGETS="-C auditbeat testsuite"
go: $GO_VERSION
stage: test
2017-03-15 09:54:31 +01:00
# Libbeat
- os: linux
env: TARGETS="-C libbeat testsuite"
2017-12-18 10:56:10 +01:00
go: $GO_VERSION
2017-12-19 13:16:39 +01:00
stage: test
2017-03-15 09:54:31 +01:00
- os: linux
env: TARGETS="-C libbeat crosscompile"
2017-12-18 10:56:10 +01:00
go: $GO_VERSION
2017-12-19 13:16:39 +01:00
stage: test
2017-03-15 09:54:31 +01:00
# Metricbeat
- os: linux
env: TARGETS="-C metricbeat testsuite"
2017-12-18 10:56:10 +01:00
go: $GO_VERSION
2017-12-19 13:16:39 +01:00
stage: test
- os: osx
2017-03-15 09:54:31 +01:00
env: TARGETS="TEST_ENVIRONMENT=0 -C metricbeat testsuite"
2017-12-18 10:56:10 +01:00
go: $GO_VERSION
2017-12-19 13:16:39 +01:00
stage: test
2017-03-15 09:54:31 +01:00
- os: linux
env: TARGETS="-C metricbeat crosscompile"
2017-12-18 10:56:10 +01:00
go: $GO_VERSION
2017-12-19 13:16:39 +01:00
stage: test
2017-03-15 09:54:31 +01:00
# Packetbeat
- os: linux
env: TARGETS="-C packetbeat testsuite"
2017-12-18 10:56:10 +01:00
go: $GO_VERSION
2017-12-19 13:16:39 +01:00
stage: test
2017-03-15 09:54:31 +01:00
# Winlogbeat
- os: linux
env: TARGETS="-C winlogbeat crosscompile"
2017-12-18 10:56:10 +01:00
go: $GO_VERSION
2017-12-19 13:16:39 +01:00
stage: test
2017-03-15 09:54:31 +01:00
# Generators
- os: linux
2017-04-18 14:04:14 +02:00
env: TARGETS="-C generator/metricbeat test"
2017-12-18 10:56:10 +01:00
go: $GO_VERSION
2017-12-19 13:16:39 +01:00
stage: test
2017-03-15 09:54:31 +01:00
- os: linux
2017-04-18 14:04:14 +02:00
env: TARGETS="-C generator/beat test"
2017-12-18 10:56:10 +01:00
go: $GO_VERSION
2017-12-19 13:16:39 +01:00
stage: test
# Kubernetes
- os: linux
install: deploy/kubernetes/.travis/setup.sh
env:
- TARGETS="-C deploy/kubernetes test"
- TRAVIS_KUBE_VERSION=v1.6.11
stage: test
- os: linux
install: deploy/kubernetes/.travis/setup.sh
env:
- TARGETS="-C deploy/kubernetes test"
- TRAVIS_KUBE_VERSION=v1.7.7
stage: test
- os: linux
install: deploy/kubernetes/.travis/setup.sh
env:
- TARGETS="-C deploy/kubernetes test"
- TRAVIS_KUBE_VERSION=v1.8.0
stage: test
addons:
apt:
packages:
- python-virtualenv
- libpcap-dev
before_install:
2017-12-19 13:16:39 +01:00
- python --version
2017-04-18 14:04:14 +02:00
- umask 022
- chmod -R go-w $GOPATH/src/github.com/elastic/beats
# Docker-compose installation
- sudo rm /usr/local/bin/docker-compose || true
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
2017-03-15 09:54:31 +01:00
# Skips installations step
install: true
script:
- make $TARGETS
notifications:
slack:
2017-12-18 10:56:10 +01:00
on_success: change
on_failure: always
on_pull_requests: false
rooms:
secure: "e25J5puEA31dOooTI4T+K+zrTs8XeWIGq2cgmiPt9u/g7eqWeQj1UJnVsr8GOu1RPDyuJZJHXqfrvuOYJTdHzXbwjD0JTbwwVVZMkkZW2SWZHG46HCXPiucjWXEr3hXJKBJDDpIx6VxrN7r17dejv1biQ8QuEFZfiB1H8kbH/ho="
after_success:
# Copy full.cov to coverage.txt because codecov.io requires this file
2017-12-19 13:16:39 +01:00
- test -f auditbeat/build/coverage/full.cov && bash <(curl -s https://codecov.io/bash) -f auditbeat/build/coverage/full.cov
- test -f filebeat/build/coverage/full.cov && bash <(curl -s https://codecov.io/bash) -f filebeat/build/coverage/full.cov
2017-03-15 09:54:31 +01:00
- test -f heartbeat/build/coverage/full.cov && bash <(curl -s https://codecov.io/bash) -f heartbeat/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 metricbeat/build/coverage/full.cov && bash <(curl -s https://codecov.io/bash) -f metricbeat/build/coverage/full.cov
2017-03-15 09:54:31 +01:00
- test -f packetbeat/build/coverage/full.cov && bash <(curl -s https://codecov.io/bash) -f packetbeat/build/coverage/full.cov