-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
46 lines (39 loc) · 2.16 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
---
sudo: required
services:
- docker
branches:
only:
- master
- develop
before_install:
# Upgrade Docker
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
# make images
- if [ "$TRAVIS_BRANCH" == "master" ]; then
docker build --build-arg SPAMSCOPE_VER=master --build-arg CURATOR_VER=$CURATOR_VER -t $DOCKER_USERNAME/spamscope-elasticsearch .;
fi
- if [ "$TRAVIS_BRANCH" == "develop" ]; then
docker build --build-arg SPAMSCOPE_VER=develop --build-arg CURATOR_VER=$CURATOR_VER -t $DOCKER_USERNAME/spamscope-elasticsearch:develop .;
fi
# command to run tests
script:
- if [ "$TRAVIS_BRANCH" == "master" ]; then
docker run --rm -it $DOCKER_USERNAME/spamscope-elasticsearch /bin/bash -c 'python -m unittest discover -s tests -f -v && thug -V && spamscope-topology -v';
fi
- if [ "$TRAVIS_BRANCH" == "develop" ]; then
docker run --rm -it $DOCKER_USERNAME/spamscope-elasticsearch:develop /bin/bash -c 'python -m unittest discover -s tests -f -v && thug -V && spamscope-topology -v';
fi
after_success:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
- if [ "$TRAVIS_BRANCH" == "master" ]; then
docker push $DOCKER_USERNAME/spamscope-elasticsearch;
fi
- if [ "$TRAVIS_BRANCH" == "develop" ]; then
docker push $DOCKER_USERNAME/spamscope-elasticsearch:develop;
fi
notifications:
email: false
slack:
secure: PBpoOpt0dY4Uj4WdjnVF+KOo/ZRAmlmiEDR4Mal0LXj3DzEJWSw3j5vkoMHePXIEx7InqxB0RueVetB2SV4h+1jqMFZGfvOjW8A2CsalPNjd1LVlz2ETKqIuaS87cfSclf5o2lB+SKDEYMcLy/QgX+ZlJA7UR1PO7xwnIxpUzbENmchJwxx+SW01tJ8MFEFAKPVANPf7tK7mwDdRWoBsT1dfjve7CO4SeIvNQsi6L/qmSyogI/0aoe47KXaRhgOs0NGQI6Pjmzbamsm3CLm2/iwna9N0AIuz9tvuH/L8lav55bqSJmeQ7a+ZWjLiVKMhlLdEyPiq0f9e0MwpzDKFdmJ+RbkasI4GWs/E3zJtK/p2z31ZeK9S4BAL4wp73FrmkHP8MUGNAcVa3SJesIkzJ7kZUMF2lJUFHYMJw6ozbpK96HjPsx6WMAhQduxK9mNgO3c2R6mgMdHBaipu9vPJqp4TfxqtT5rclK+xfGAGsPpvWoNpYqqBKIYr1chT7k48jZuPkq3qg4gIgNDad1/pUbvejLR8gGZyHUZncXEZvnQcLjsk5wFhT083JR5MiFT+ZnSXWyy8ZJ+ATnSg/btUri00D3DxweKWkpAEoYxJz+7MiU5m8kriob+IEN4TFfFV28RXqSm13QLm+GrP9UjeaOPXZ7WE/nKNAbRm+ivhrP0=