-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml.bak
30 lines (27 loc) · 1.13 KB
/
circle.yml.bak
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:
services:
- docker
- postgresql
- redis
dependencies:
cache_directories:
- "~/docker"
override:
- if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
- docker build -t unicef/equitrack:etools .
- mkdir -p ~/docker; docker save unicef/equitrack:etools > ~/docker/image.tar
test:
pre:
- sudo bash -c "echo \"listen_addresses = '*'\" >>
/etc/postgresql/9.4/main/postgresql.conf"
- sudo bash -c "echo \"host all all 0.0.0.0/0 trust\" >>
/etc/postgresql/9.4/main/pg_hba.conf"
- sudo /etc/init.d/postgresql restart
override:
- export HOSTIP=`ip -4 addr show scope global dev eth0 | grep inet | awk '{print \$2}' | cut -d / -f 1`;
docker run -it -e "DATABASE_URL=postgis://ubuntu@docker:5432/circle_test" --add-host=docker:${HOSTIP} unicef/equitrack:etools
- coverage run manage.py runserver --keepdb --settings=EquiTrack.settings.test
- psql --output=restore_db.log --quiet circle_test < ./tests/fixtures/data.sql
- gulp replace-circleci --ip=${HOSTIP}
- screen -d -m -L ionic serve --nolivereload --nobrowser
- protractor tests/conf_dev.js