1 Star 0 Fork 0

zhangjungang / beats

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.travis.yml 12.88 KB
一键复制 编辑 原始数据 按行查看 历史
Victor Martinez 提交于 2020-07-23 16:37 . [CI] remove codecov step (#20102)
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"
- DOCKER_COMPOSE_VERSION=1.21.0
- TRAVIS_GO_VERSION=$(cat .go-version)
# Newer versions of minikube fail on travis, see: https://github.com/kubernetes/minikube/issues/2704
- TRAVIS_MINIKUBE_VERSION=v0.25.2
- MACOSX_DEPLOYMENT_TARGET=10.15
# Enable verbose output since Travis users cannot access test output that is written to files.
# The constant output from tests also prevents time-outs.
- MAGEFILE_VERBOSE=true
# Only run CI jobs on specific branches.
# To keep the number of Travis CI jobs in check, we decided to configure Travis to only kick off CI jobs for the master branch.
branches:
only:
- master
jobs:
include:
# General checks
- os: linux
env: TARGETS="check"
go: $TRAVIS_GO_VERSION
stage: check
# Filebeat
- os: linux
before_install: .ci/scripts/travis_has_changes.sh filebeat libbeat || travis_terminate 0
env:
- PROJECT=filebeat
- MAGE='build test'
go: $TRAVIS_GO_VERSION
stage: test
- os: osx
before_install: .ci/scripts/travis_has_changes.sh filebeat libbeat || travis_terminate 0
env:
- PROJECT=filebeat
- MAGE='build unitTest'
go: $TRAVIS_GO_VERSION
stage: test
- os: linux
before_install: .ci/scripts/travis_has_changes.sh x-pack/filebeat filebeat libbeat || travis_terminate 0
env:
- PROJECT=x-pack/filebeat
- MAGE='build test'
go: $(GO_VERSION)
stage: test
# Heartbeat
- os: linux
before_install: .ci/scripts/travis_has_changes.sh heartbeat libbeat || travis_terminate 0
env:
- PROJECT=heartbeat
- MAGE='build test'
go: $TRAVIS_GO_VERSION
stage: test
- os: osx
before_install: .ci/scripts/travis_has_changes.sh heartbeat libbeat || travis_terminate 0
env:
- PROJECT=heartbeat
- MAGE='build unitTest'
go: $TRAVIS_GO_VERSION
stage: test
# Auditbeat
- os: linux
before_install: .ci/scripts/travis_has_changes.sh auditbeat libbeat || travis_terminate 0
env:
- PROJECT=auditbeat
- MAGE='build test'
go: $TRAVIS_GO_VERSION
stage: test
- os: osx
before_install: .ci/scripts/travis_has_changes.sh auditbeat libbeat || travis_terminate 0
env:
- PROJECT=auditbeat
- MAGE='build unitTest'
go: $TRAVIS_GO_VERSION
stage: test
- os: linux
before_install: .ci/scripts/travis_has_changes.sh auditbeat libbeat || travis_terminate 0
env: TARGETS="-C auditbeat crosscompile"
go: $TRAVIS_GO_VERSION
stage: test
- os: linux
before_install: .ci/scripts/travis_has_changes.sh x-pack/auditbeat auditbeat libbeat || travis_terminate 0
env:
- PROJECT=x-pack/auditbeat
- MAGE='build test'
go: $TRAVIS_GO_VERSION
stage: test
- os: osx
before_install: .ci/scripts/travis_has_changes.sh x-pack/auditbeat auditbeat libbeat || travis_terminate 0
env:
- PROJECT=x-pack/auditbeat
- MAGE='build unitTest'
go: $TRAVIS_GO_VERSION
stage: test
# Libbeat
- os: linux
before_install: .ci/scripts/travis_has_changes.sh libbeat || travis_terminate 0
env:
- PROJECT=libbeat
- MAGE='build test'
# The libbeat tests are so verbose that they exceed the maximum allowed log length of Travis CI.
- MAGEFILE_VERBOSE=false
go: $TRAVIS_GO_VERSION
stage: test
- os: linux
before_install: .ci/scripts/travis_has_changes.sh libbeat || travis_terminate 0
env: TARGETS="-C libbeat crosscompile"
go: $TRAVIS_GO_VERSION
stage: test
- os: linux
before_install: .ci/scripts/travis_has_changes.sh libbeat || travis_terminate 0
env: STRESS_TEST_OPTIONS="-timeout=20m -race -v -parallel 1" TARGETS="-C libbeat stress-tests"
go: $TRAVIS_GO_VERSION
stage: test
- os: linux
before_install: .ci/scripts/travis_has_changes.sh x-pack/libbeat libbeat || travis_terminate 0
env:
- PROJECT=x-pack/libbeat
- MAGE='build test'
go: $TRAVIS_GO_VERSION
stage: test
# Metricbeat
- os: linux
before_install: .ci/scripts/travis_has_changes.sh metricbeat libbeat || travis_terminate 0
env:
- PROJECT=metricbeat
- MAGE='build unitTest'
go: $TRAVIS_GO_VERSION
stage: test
- os: linux
before_install: .ci/scripts/travis_has_changes.sh metricbeat libbeat || travis_terminate 0
install:
- .ci/scripts/install-kind.sh
- .ci/scripts/install-kubectl.sh
env:
- K8S_VERSION=v1.17.2
- KIND_VERSION=v0.7.0
- PROJECT=metricbeat
- MAGE='goIntegTest'
go: $TRAVIS_GO_VERSION
stage: test
- os: linux
before_install: .ci/scripts/travis_has_changes.sh metricbeat libbeat || travis_terminate 0
env:
- PROJECT=metricbeat
- MAGE='pythonIntegTest'
go: $TRAVIS_GO_VERSION
stage: test
- os: osx
before_install: .ci/scripts/travis_has_changes.sh metricbeat libbeat || travis_terminate 0
env:
- PROJECT=metricbeat
- MAGE='build unitTest'
go: $TRAVIS_GO_VERSION
stage: test
- os: linux
before_install: .ci/scripts/travis_has_changes.sh metricbeat libbeat || travis_terminate 0
env: TARGETS="-C metricbeat crosscompile"
go: $TRAVIS_GO_VERSION
stage: test
- os: linux
before_install: .ci/scripts/travis_has_changes.sh x-pack/metricbeat metricbeat libbeat || travis_terminate 0
env:
- PROJECT=x-pack/metricbeat
- MAGE='build unitTest'
go: $TRAVIS_GO_VERSION
stage: test
- os: linux
before_install: .ci/scripts/travis_has_changes.sh x-pack/metricbeat metricbeat libbeat || travis_terminate 0
env:
- PROJECT=x-pack/metricbeat
- MAGE='goIntegTest'
go: $TRAVIS_GO_VERSION
stage: test
- os: linux
before_install: .ci/scripts/travis_has_changes.sh x-pack/metricbeat metricbeat libbeat || travis_terminate 0
env:
- PROJECT=x-pack/metricbeat
- MAGE='pythonIntegTest'
go: $TRAVIS_GO_VERSION
stage: test
- os: osx
before_install: .ci/scripts/travis_has_changes.sh metricbeat libbeat || travis_terminate 0
env:
- PROJECT=x-pack/metricbeat
- MAGE='build unitTest'
go: $TRAVIS_GO_VERSION
stage: test
# Packetbeat
- os: linux
before_install: .ci/scripts/travis_has_changes.sh packetbeat libbeat || travis_terminate 0
env:
- PROJECT=packetbeat
- MAGE='build test'
go: $TRAVIS_GO_VERSION
stage: test
# Winlogbeat
- os: linux
before_install: .ci/scripts/travis_has_changes.sh winlogbeat libbeat || travis_terminate 0
env: TARGETS="-C winlogbeat crosscompile"
go: $TRAVIS_GO_VERSION
stage: test
# Functionbeat
- os: linux
before_install: .ci/scripts/travis_has_changes.sh x-pack/functionbeat libbeat || travis_terminate 0
env:
- PROJECT=x-pack/functionbeat
- MAGE='build test'
go: $TRAVIS_GO_VERSION
stage: test
- os: osx
before_install: .ci/scripts/travis_has_changes.sh x-pack/functionbeat libbeat || travis_terminate 0
env:
- PROJECT=x-pack/functionbeat
- MAGE='build unitTest'
go: $TRAVIS_GO_VERSION
stage: test
- os: linux
before_install: .ci/scripts/travis_has_changes.sh x-pack/functionbeat libbeat || travis_terminate 0
env:
- PROJECT=x-pack/functionbeat
- MAGE='testGCPFunctions'
go: 1.13.1
stage: test
# Docker Log Driver
- os: linux
before_install: .ci/scripts/travis_has_changes.sh x-pack/dockerlogbeat libbeat || travis_terminate 0
env:
- PROJECT=x-pack/dockerlogbeat
- MAGE='build test'
go: $TRAVIS_GO_VERSION
stage: test
# Journalbeat
- os: linux
before_install: .ci/scripts/travis_has_changes.sh journalbeat libbeat || travis_terminate 0
env:
- PROJECT=journalbeat
- MAGE='build goUnitTest'
go: $TRAVIS_GO_VERSION
stage: test
# Agent
- os: linux
before_install: .ci/scripts/travis_has_changes.sh x-pack/elastic-agent libbeat || travis_terminate 0
env:
- PROJECT=x-pack/elastic-agent
- MAGE='build test'
go: $TRAVIS_GO_VERSION
stage: test
- os: osx
before_install: .ci/scripts/travis_has_changes.sh x-pack/elastic-agent libbeat || travis_terminate 0
env:
- PROJECT=x-pack/elastic-agent
- MAGE='build unitTest'
go: $TRAVIS_GO_VERSION
stage: test
# Generators
- os: linux
before_install: .ci/scripts/travis_has_changes.sh generator metricbeat libbeat || travis_terminate 0
env: TARGETS="-C generator/_templates/metricbeat test test-package"
go: $TRAVIS_GO_VERSION
stage: test
- os: linux
before_install: .ci/scripts/travis_has_changes.sh generator libbeat || travis_terminate 0
env: TARGETS="-C generator/_templates/beat test test-package"
go: $TRAVIS_GO_VERSION
stage: test
- os: osx
before_install: .ci/scripts/travis_has_changes.sh generator metricbeat libbeat || travis_terminate 0
env: TARGETS="-C generator/_templates/metricbeat test"
go: $TRAVIS_GO_VERSION
stage: test
- os: osx
before_install: .ci/scripts/travis_has_changes.sh generator libbeat || travis_terminate 0
env: TARGETS="-C generator/_templates/beat test"
go: $TRAVIS_GO_VERSION
stage: test
# Kubernetes
- os: linux
before_install: .ci/scripts/travis_has_changes.sh deploy/kubernetes metricbeat filebeat libbeat || travis_terminate 0
install: deploy/kubernetes/.travis/setup.sh
env:
- TARGETS="-C deploy/kubernetes test"
- TRAVIS_K8S_VERSION=v1.9.4
stage: test
- os: linux
before_install: .ci/scripts/travis_has_changes.sh deploy/kubernetes metricbeat filebeat libbeat || travis_terminate 0
install: deploy/kubernetes/.travis/setup.sh
env:
- TARGETS="-C deploy/kubernetes test"
- TRAVIS_K8S_VERSION=v1.10.0
stage: test
- os: linux
before_install: .ci/scripts/travis_has_changes.sh deploy/kubernetes metricbeat filebeat libbeat || travis_terminate 0
dist: xenial
install: deploy/kubernetes/.travis/setup.sh
env:
- TARGETS="-C deploy/kubernetes test"
- TRAVIS_K8S_VERSION=v1.15.3
- TRAVIS_MINIKUBE_VERSION=v1.3.1
stage: test
addons:
apt:
config:
retries: true
update: true
packages:
- libpcap-dev
- xsltproc
- libxml2-utils
- librpm-dev
# TODO include 1.11 once minikube supports it
#- os: linux
# install: deploy/kubernetes/.travis/setup.sh
# env:
# - TARGETS="-C deploy/kubernetes test"
# - TRAVIS_K8S_VERSION=v1.11.0
# stage: test
addons:
apt:
config:
retries: true
update: true
sources:
- deadsnakes
packages:
- libpcap-dev
- xsltproc
- libxml2-utils
- libsystemd-journal-dev
- librpm-dev
# From deadsnakes PPA
- python3.6
- python3.6-venv
# Skips installations step
install: true
before_script:
- if [ x$TRAVIS_DIST = xtrusty ]; then sudo ln -sf python3.6 /usr/bin/python3; fi
- python --version
- python3 --version
- 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
- if [ $TRAVIS_OS_NAME = osx ]; then pip install virtualenv==16.7.9; fi
- make mage
script:
# Replacement for travis_wait which doesn't print output in real time.
# Default Travis timeout is 10min, so this workaround prints timestamps every 9min to reset the counter.
# Using seconds (540s = 9min) instead of minutes for shell compatibility reasons.
- while sleep 540; do echo "=====[ ${SECONDS} seconds still running ]====="; done &
- if [[ -n "$MAGE" ]]; then
echo ">> mage $MAGE from $PROJECT";
cd "$PROJECT";
mage $MAGE;
else
echo ">> make $TARGETS";
make $TARGETS;
fi
- kill %1
notifications:
slack:
on_success: change
on_failure: always
on_pull_requests: false
rooms:
secure: "e25J5puEA31dOooTI4T+K+zrTs8XeWIGq2cgmiPt9u/g7eqWeQj1UJnVsr8GOu1RPDyuJZJHXqfrvuOYJTdHzXbwjD0JTbwwVVZMkkZW2SWZHG46HCXPiucjWXEr3hXJKBJDDpIx6VxrN7r17dejv1biQ8QuEFZfiB1H8kbH/ho="
1
https://gitee.com/zhangjungang/beats.git
git@gitee.com:zhangjungang/beats.git
zhangjungang
beats
beats
master

搜索帮助