-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (43 loc) · 1.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
47
48
branches:
# all branches
only:
- gh-pages
- /.*/
language: python
python:
- "3.6"
services:
- docker
install:
# Build/test dependencies
- pip install --no-cache-dir -r requirements/prod.txt
- pip install coveralls
script:
- echo $TRAVIS_BRANCH;
# Run django tests. (Note: For django settings, use a travis env variable)
#
- python manage.py test
after_success:
#
# Build images and push to dockerhub
#
- echo $TRAVIS_BRANCH;
- if [ "$TRAVIS_BRANCH" == "master" ]; then
docker build -t tworavens/psi-web:master -f Dockerfile-web .;
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push tworavens/psi-web:master;
fi
- if [ "$TRAVIS_BRANCH" == "61-deploy" ]; then
docker build -t tworavens/psi-web:master -f Dockerfile-web .;
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push tworavens/psi-web:master;
fi
- if [ "$TRAVIS_BRANCH" == "develop" ]; then
docker build -t tworavens/psi-web:latest -f Dockerfile-web .;
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push tworavens/psi-web:latest;
fi
#
# send report to coveralls
#
- coveralls