forked from MISP/MISP-Taxii-Server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
42 lines (36 loc) · 1.43 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
sudo: required
language: python
python:
- "3.5"
- "3.6"
services:
- mysql
- docker
env:
- OPENTAXII_CONFIG=$TRAVIS_BUILD_DIR/config/config.travis.yaml URL="http://localhost" APIKEY=testmispapikeytestmispapikeytestmispapik
before_install:
- sudo apt-get install mysql-server-5.6 mysql-client-core-5.6 mysql-client-5.6 libxml2-dev libxslt1-dev zlib1g-dev
- pip install -r REQUIREMENTS.txt
- python setup.py install
- docker pull floatingghost/misp-testable:v2.4.102
- docker run -d -p 80:80 floatingghost/misp-testable:v2.4.102
install:
# Check the config is ok
- echo $OPENTAXII_CONFIG
- mysql --version
#Configure hooks
- <misp_taxii_hooks/hooks.py sed 's@\[URL\]@'"$URL"'@; s@\[APIKEY\]@'"$APIKEY"'@' > misp_taxii_hooks/hooks.py
- head -n20 misp_taxii_hooks/hooks.py
- python setup.py install
# 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
- opentaxii-sync-data config/data-configuration.yaml
script:
- opentaxii-run-dev &
- pid=$!
- sleep 15
- taxii-push --path http://127.0.0.1:9000/services/inbox -f test/test.xml --dest my_collection --username admin --password admin
- kill -s INT $pid