2016-11-19 16:42:54 +01:00
|
|
|
dist: trusty
|
|
|
|
sudo: required
|
|
|
|
|
2016-11-18 14:51:01 +01:00
|
|
|
language: python
|
|
|
|
|
|
|
|
python:
|
|
|
|
- "3.5"
|
|
|
|
- "nightly"
|
|
|
|
|
|
|
|
services:
|
|
|
|
- mysql
|
|
|
|
|
|
|
|
env:
|
2017-01-13 15:08:41 +01:00
|
|
|
- OPENTAXII_CONFIG=$TRAVIS_BUILD_DIR/config/config.travis.yaml URL="http://35.163.95.230" APIKEY=pF4Rq3JOHbYAJLMiFDqRPpLxAh3s0PakiSPKWSN5
|
2016-11-18 14:51:01 +01:00
|
|
|
|
2016-11-19 16:42:54 +01:00
|
|
|
before_install:
|
2017-06-22 13:05:17 +02:00
|
|
|
- sudo apt-get install mysql-server-5.6 mysql-client-core-5.6 mysql-client-5.6 libxml2-dev libxslt1-dev zlib1g-dev
|
|
|
|
- wget "https://github.com/TAXIIProject/libtaxii/archive/1.1.111.tar.gz"
|
|
|
|
- tar xf 1.1.111.tar.gz
|
|
|
|
- cd libtaxii-1.1.111
|
2017-06-22 13:10:24 +02:00
|
|
|
- pip install -r requirements.txt
|
|
|
|
- python setup.py install
|
2017-06-22 13:05:17 +02:00
|
|
|
- cd ..
|
2016-11-19 16:42:54 +01:00
|
|
|
|
2016-11-18 14:51:01 +01:00
|
|
|
install:
|
2016-11-19 16:42:54 +01:00
|
|
|
# Check the config is ok
|
|
|
|
- echo $OPENTAXII_CONFIG
|
|
|
|
- mysql --version
|
2016-11-18 14:51:01 +01:00
|
|
|
# Set up the deps
|
|
|
|
- git submodule init
|
|
|
|
- git submodule update
|
2016-11-18 15:59:30 +01:00
|
|
|
#Configure hooks
|
|
|
|
- <misp_taxii_hooks/hooks.py sed 's@\[URL\]@'"$URL"'@; s@\[APIKEY\]@'"$APIKEY"'@' > misp_taxii_hooks/hooks.py
|
2016-11-19 16:42:54 +01:00
|
|
|
- head -n20 misp_taxii_hooks/hooks.py
|
2016-11-18 15:59:30 +01:00
|
|
|
- python setup.py install
|
2016-11-18 14:51:01 +01:00
|
|
|
# Install OpenTAXII
|
|
|
|
- cd OpenTAXII
|
|
|
|
- python setup.py install
|
|
|
|
- cd ..
|
|
|
|
# Create databases
|
|
|
|
- mysql -u root -e 'create database taxiiauth; create database taxiipersist;'
|
|
|
|
- mysql -u root -e "grant all on taxiiauth.* to 'taxii'@'%' identified by 'some_password';"
|
|
|
|
- mysql -u root -e "grant all on taxiipersist.* to 'taxii'@'%' identified by 'some_password';"
|
|
|
|
# Populate databases
|
2016-12-28 12:10:31 +01:00
|
|
|
- opentaxii-create-services -c config/services.yaml
|
|
|
|
- opentaxii-create-collections -c config/collections.yaml
|
2016-11-19 16:42:54 +01:00
|
|
|
- opentaxii-create-account -u travis -p travis
|
2016-11-18 14:51:01 +01:00
|
|
|
script:
|
2016-11-18 15:48:46 +01:00
|
|
|
- opentaxii-run-dev &
|
|
|
|
- pid=$!
|
2016-11-19 16:42:54 +01:00
|
|
|
- sleep 15
|
2016-11-18 14:51:01 +01:00
|
|
|
- cd tests
|
|
|
|
- nosetests .
|
|
|
|
- cd ..
|
2016-11-18 15:48:46 +01:00
|
|
|
- kill -s INT $pid
|