forked from Abacus-Group-RTO/legion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
33 lines (26 loc) · 918 Bytes
/
.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
env:
global:
- COMMIT=${TRAVIS_COMMIT::8}
language: python
sudo: true
python:
- "3.6"
cache: pip
install:
- cp ./requirements.txt ./deps/
- bash ./deps/installPythonLibs.sh
script:
- flake8
- python -m unittest
after_success:
- (test $TRAVIS_PULL_REQUEST != "false") && exit 0
- (test $TRAVIS_BRANCH != "master" && test $TRAVIS_BRANCH != "development") && exit 0
- cd ./docker/
- docker login -u $DOCKER_USER -p $DOCKER_PASS
- export REPO=gvit/legion
- docker build -f Dockerfile -t $REPO:$COMMIT . --no-cache
- docker tag $REPO:$COMMIT $REPO:travis-$TRAVIS_BUILD_NUMBER
- test $TRAVIS_BRANCH = "master" && docker tag $REPO:$COMMIT $REPO:latest
- test $TRAVIS_BRANCH = "master" && docker push gvit/legion:latest
- test $TRAVIS_BRANCH = "development" && docker tag $REPO:$COMMIT $REPO:development
- test $TRAVIS_BRANCH = "development" && docker push gvit/legion:development