-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
75 lines (60 loc) · 3.25 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
language: python
python:
- 3.4
services:
- docker
before_install:
- docker build . -t avalon/files -f Dockerfile-files
- docker build . -t avalon/database -f Dockerfile-database
- docker build . -t avalon/tracker -f Dockerfile-tracker
- docker run --name avalon-files -d --rm
-p 445:445
-v /avalon:/travis
avalon/files
-s "Avalon;/avalon;yes;yes;yes;all;none;all"
-u "avalon;default"
- docker run --name avalon-database -d --rm
-v avalon-database:/data/db
-p 27017:27017
avalon/database
- docker run --name avalon-tracker -d --rm
-v avalon-tracker:/var/lib/postgresql
-v avalon-tracker:/opt/zou/zou/thumbnails
-p 80:80
avalon/tracker
# Expose Avalon files to Travis
- docker exec avalon-files cp -a /avalon/. /travis/
env:
global:
- AVALON_DEBUG=true
- WORKDIR=/avalon
# For deployment
- secure: A/rnownMQTYJOKNgNESg8p9ByuA7bozKVqWW6VIQvzkV7KqUd2Uc5rcJzv9yY8T55QhjJX9krWHABjWDKpe9mN9qZ4t8ADZwSH6fP5UFJehPyoxArIoNJL+HlQZJOarFnUT9SCAoqzfjQU6hsbo8sgZuQbur3db6jyMyFXUeYzfVlOQEyUysaX5KBLTfr1p6aVPM3Zq9y8ETutV457dfFib3CLldwkZWcbG+EnokwJZ5V0wCzUbfmDh1fxOEK/UixxJwB71dzxGHRcx0G/5m3+C5ssLcrNlueJRvrxxaEB81Emn09D1m+Ji8/6dopJkGiuGIpLb/bpa6sDdGXn235lLvKf2tMRwkHp5MTp/KsTjaRzC3AWjSS+jGT8WAOBFUiiqITZB8Fv1RYQxV2gfcilhdZfY2mUN6GQCRxvEDUreiEQadM1mCxDAs5cTDt4kZMzdBsFOa8DwMAlulOs4YESY+ItMikn0KR3xj3AeMyYsZwGW+2BHGZtI8SY7SHiEPNJbhCvZ8uLvbA+rCdBeIw8lAzf/0VJn0jjfw4ScLUz0BxJ1sPV/8bQUZQeyIjNH5f6O9ovwH6I4J6/FLOI8L3DDoZVghNDrBROg+TEwLZTaQfUyN0c/HsVQk+q6bW22ojkqlGvYqRaa6UIrCyfe3VJbGy3d1Pz4PXaU7UiiKANw=
- secure: m1mkGfO5oOJc8UO8hHL2qeKxD/ZalH+WlVGXwT/SDs9KNFIPdBOu6iE+weJox+U3g6M0CqP3k6O8nuL5iGHs33WKHdvROVoc4bFapSscBMyQigjBJApsor2XWvsKwXjPsINea4PYj/NEbakpOIBduGRWq3+QZXnMP0RZqC6lBWEkG4iTfpqtK5SjO6ptGCvF4jIn3ayTENJ8LzN3jZhBhEbtDSrnEE6UJsxMOO8Z0tQgAHULXhWS9zHc6i2DUvsQhPaG6I07GTtKWdfpQB3ldzWJGoOrC4zbgcOUyOhznzjlf+ofKqlE+3ER1cnX4Rr0URqiecRgEKb2S5iypqOQ4SmpQS85seXvrTYpYvRJBdn2eYgGCX230B0bn7x0+XHCVQG4iCFGLBNfQohKHuQkq6bWl9hXGWNb3E6Gu+cPQBbDuEiFYay7wLDG2jSeEC/x7KYwrY42WY77OU3dKVInHD2ra4s1J42BPe5rTTS6ya4mA2ndiBRP/mUJpFjJkGQ7/++hkJ7/oU4fgEspr0wwnv56+mnFz4oW/sxk7cx8oa0PgUzxbZhSx8xO8GiuWDMVIQJDOxvfD5EKBOVDEUvdK36UKvCEf745WnPelgCPi9q7kd2QNl9VDF8CXMcw7YXNwoqu3ObOfWNTsdpPY9b1lyDdnxFXPbdwkBUyRC99CMQ=
script:
- . /avalon/terminal.sh
- . tests/test_cli.sh
- python -m nose tests
after_success:
- |
if [[ "$TRAVIS_BRANCH" != "master" && ! -z "$TRAVIS_TAG" ]]; then
echo Deploying from GitHub release "$TRAVIS_TAG"
echo Tagging $TRAVIS_TAG..
docker tag avalon/files avalon/files:$TRAVIS_TAG
docker tag avalon/database avalon/database:$TRAVIS_TAG
docker tag avalon/tracker avalon/tracker:$TRAVIS_TAG
echo Pushing $TRAVIS_TAG..
docker push avalon/files:$TRAVIS_TAG
docker push avalon/database:$TRAVIS_TAG
docker push avalon/tracker:$TRAVIS_TAG
echo Tagging latest..
docker tag avalon/files avalon/files:latest
docker tag avalon/database avalon/database:latest
docker tag avalon/tracker avalon/tracker:latest
echo Pushing latest..
docker push avalon/files:latest
docker push avalon/database:latest
docker push avalon/tracker:latest
echo Successfully deployed Avalon
fi
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin