forked from DataDog/integrations-extras
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
80 lines (69 loc) · 2.6 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
sudo: required
language: python
cache:
directories:
- $home/.cache/pip
- $home/dd-agent
- vendor/cache
python:
- "2.7"
git:
depth: 3
branches:
only:
- master
services:
- docker
matrix:
fast_finish: true
env:
global:
- NOSE_FILTER="not windows and not fixme"
- VOLATILE_DIR=/tmp/integration-sdk-testing
- SKIP_CLEANUP=true
- INTEGRATIONS_DIR=$HOME/embedded
- PIP_CACHE=$HOME/.cache/pip
- SDK_TESTING=true
- BUNDLE_PATH=$TRAVIS_BUILD_DIR/vendor/cache
- DD_AGENT_BRANCH=master
- CORE_BRANCH=master
- JMXFETCH_URL="https://dd-jmxfetch.s3.amazonaws.com"
- REQ_LOCALS="$TRAVIS_BUILD_DIR,$HOME/dd-agent,$HOME/integrations-core"
matrix:
- TRAVIS_FLAVOR=default
- TRAVIS_FLAVOR=snmpwalk
- TRAVIS_FLAVOR=hbase_master
- TRAVIS_FLAVOR=hbase_regionserver
- TRAVIS_FLAVOR=redis_sentinel FLAVOR_VERSION="latest"
- TRAVIS_FLAVOR=neo4j
- TRAVIS_FLAVOR=storm FLAVOR_VERSION=latest
# END OF TRAVIS MATRIX
before_install:
- sudo apt-get update ; sudo apt-get install -y curl apt-transport-https git snmp snmp-mibs-downloader
install:
- bundle install
- bundle package
- git -C $HOME/dd-agent pull || git clone -b $DD_AGENT_BRANCH --depth 1 https://github.com/DataDog/dd-agent.git $HOME/dd-agent
- git -C $HOME/integrations-core pull || git clone -b $CORE_BRANCH --depth 1 https://github.com/DataDog/integrations-core.git $HOME/integrations-core
- echo "$HOME/dd-agent/" > $(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/datadog-agent.pth
- pip install 'docker-compose==1.9.0'
- pip install pylint
- if [ -e $TRAVIS_BUILD_DIR/requirements.txt ]; then pip install -r $TRAVIS_BUILD_DIR/requirements.txt; fi
- if [ -e $TRAVIS_BUILD_DIR/requirements-test.txt ]; then pip install -r $TRAVIS_BUILD_DIR/requirements-test.txt; fi
- if [ -e $TRAVIS_BUILD_DIR/requirements-opt.txt ]; then pip install -r $TRAVIS_BUILD_DIR/requirements-opt.txt; fi
- if [ -e ~/dd-agent/requirements.txt ]; then pip install -r ~/dd-agent/requirements.txt; fi
- bundle exec rake setup_agent_libs
script:
- bundle exec rake prep_travis_ci
- bundle exec rake ci:run
- bundle exec rake lint
- bundle exec rake requirements
# we should clean generated files before we save the cache
# We don't want to save .pyc files
# Since clobber only cleans the project directory,
# everything outside of it should be cleaned, too, so we'll use find and -delete
before_cache:
- rake clobber
- find $HOME/.cache/pip $HOME/dd-agent -name *.pyc -delete
after_script:
- if [[ $(docker ps -a -q) ]]; then docker stop $(docker ps -a -q); fi