-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
64 lines (56 loc) · 2.36 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
language: c
env:
- TRAVIS_PYTHON_VERSION="3.4"
- TRAVIS_PYTHON_VERSION="3.5"
os: linux
sudo: required
dist: trusty
before_install:
- sudo apt-get update -qq
# td-agent and plugin setup
- curl -L https://toolbelt.treasuredata.com/sh/install-ubuntu-trusty-td-agent2.sh | sh
- git clone https://github.com/sowawa/fluent-plugin-slack.git $HOME/fluent-plugin-slack
- cd $HOME/fluent-plugin-slack && git checkout v0.6.4 && git am --signoff < $TRAVIS_BUILD_DIR/fluent-plugin-slack-with-dd.patch
- echo $TRAVIS_BUILD_DIR/td-agent.conf | sudo tee -a /etc/td-agent/td-agent.conf
# rbenv setup for jruby used by Norikra
- git clone https://github.com/rbenv/rbenv.git ~/.rbenv
- echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
- echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
- . ~/.bash_profile
- git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
- rbenv install jruby-1.7.20
- rbenv rehash
- rbenv shell jruby-1.7.20
- java -version # make sure if Java version is 1.8
# anaconda (python) setup
- sudo apt-get install -y libopenblas-dev
- sudo which python && sudo python --version
install:
- sudo td-agent-gem install fluent-plugin-dd fluent-plugin-record-reformer fluent-plugin-norikra
- sudo td-agent-gem install fluent-plugin-slack -v 0.6.4
- gem install sinatra
- gem install norikra -v 1.4.0
- gem install norikra-udf-dateformat
- sudo pip install -r requirements.txt
- sudo pip install nose
before_script:
- sudo cp $HOME/fluent-plugin-slack/lib/fluent/plugin/out_slack.rb /opt/td-agent/embedded/lib/ruby/gems/*/gems/fluent-plugin-slack-0.6.4/lib/fluent/plugin/out_slack.rb
- sudo mkdir /etc/changefinder /var/run/changefinder /var/log/changefinder
- cd $TRAVIS_BUILD_DIR
- mv config/example.ini config/datadog.ini
- sudo cp config/datadog.ini /etc/changefinder/datadog.ini
- sudo cp changefinder.sh /etc/init.d/changefinder
- sudo ln -s $TRAVIS_BUILD_DIR /usr/share/datadog-anomaly-detector
script:
- sudo nosetests core/tests
- sudo nosetests cli/tests
after_script:
- sudo /etc/init.d/td-agent restart
- sudo /etc/init.d/td-agent status
- norikra start --stats=/etc/norikra/norikra.json -l /var/log/norikra -Xmx2g --daemonize
- sudo service changefinder start
- sudo service changefinder stop
- norikra stop
- sudo /etc/init.d/td-agent stop
notifications:
email: false