forked from NeuroVault/NeuroVault
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
30 lines (26 loc) · 1.05 KB
/
circle.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
machine:
pre:
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
services:
- docker
dependencies:
cache_directories:
- "~/docker"
override:
- pip install docker-compose
- if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
- ./scripts/git-set-file-times
- docker build -t neurovault/neurovault .
- docker pull nginx && docker pull postgres && docker pull redis && docker pull cogniteev/echo
- mkdir -p ~/docker; docker save "neurovault/neurovault" > ~/docker/image.tar
test:
override:
- docker-compose --verbose up -d && sleep 50
- curl --retry 10 --retry-delay 15 -vkf http://localhost
- set -o pipefail && docker-compose run uwsgi python manage.py test -v 2 2>&1 | tee log.txt
- if grep -q "^OK" log.txt; then true; else cat log.txt; false; fi
deployment:
hub:
branch: master
commands:
- if [[ -n "$DOCKER_PASS" ]]; then docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS && docker push $DOCKER_REPO; fi