2016-11-19 16:42:54 +01:00
|
|
|
sudo: required
|
|
|
|
|
2016-11-18 14:51:01 +01:00
|
|
|
language: python
|
|
|
|
|
|
|
|
python:
|
|
|
|
- "3.5"
|
2019-02-12 18:11:36 +01:00
|
|
|
- "3.6"
|
2016-11-18 14:51:01 +01:00
|
|
|
|
|
|
|
services:
|
|
|
|
- mysql
|
2019-02-12 17:23:02 +01:00
|
|
|
- docker
|
2016-11-18 14:51:01 +01:00
|
|
|
|
|
|
|
env:
|
2019-02-12 18:11:36 +01:00
|
|
|
- OPENTAXII_CONFIG=$TRAVIS_BUILD_DIR/config/config.travis.yaml URL="http://localhost" APIKEY=testmispapikeytestmispapikeytestmispapik
|
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
|
2019-02-12 18:11:36 +01:00
|
|
|
- pip install -r REQUIREMENTS.txt
|
2017-06-22 13:10:24 +02:00
|
|
|
- python setup.py install
|
2019-02-12 17:23:02 +01:00
|
|
|
- docker pull floatingghost/misp-testable:v2.4.102
|
|
|
|
- docker run -d -p 80:80 floatingghost/misp-testable:v2.4.102
|
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 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
|
|
|
# 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
|
2019-02-12 18:11:36 +01:00
|
|
|
- opentaxii-sync-data config/data-configuration.yaml
|
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
|
2019-02-12 18:32:50 +01:00
|
|
|
- taxii-push --path http://127.0.0.1:9000/services/inbox -f test/test.xml --dest my_collection --username admin --password admin
|
2016-11-18 15:48:46 +01:00
|
|
|
- kill -s INT $pid
|