forked from kartoza/docker-pg-backup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (31 loc) · 995 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
34
35
36
37
sudo: required
services:
- docker
env:
- COMPOSE_FILE=docker-compose.yml:docker-compose.override.travis.yml
script:
- ls -lah
- docker-compose up -d
- docker-compose ps
- docker-compose exec dbbackup /bin/bash -c "until psql -l; do echo 'db unavailable. sleeping'; sleep 1; done"
- docker-compose exec dbbackup ls
# Test backup
- docker-compose exec dbbackup /backups.sh
- export ARCHIVE_DUMP="backups/$(date +%Y)/$(date +%B)/watchkeeper_gis.$(date +%d-%B-%Y).dmp"
- ls -lah ${ARCHIVE_DUMP}
# Test restore
- docker-compose exec dbbackup cp /${ARCHIVE_DUMP} /backups/target_archive.dmp
- docker-compose exec dbbackup psql -l gis
- docker-compose exec dbbackup dropdb gis
- docker-compose exec dbbackup psql -l
- docker-compose exec dbbackup /restore.sh
- docker-compose exec dbbackup psql -l gis
before_script:
- ./build-test.sh
notifications:
irc:
channels:
- "irc.freenode.org#inasafe"
use_notice: true
email:
- tim@kartoza.com