Skip to content

Commit

Permalink
fix travis
Browse files Browse the repository at this point in the history
  • Loading branch information
NyakudyaA committed Apr 19, 2020
1 parent 3f76237 commit 4439b52
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:

script:
- ls -lah
- docker-compose up -d --build dbbackup
- 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
Expand All @@ -24,6 +24,9 @@ script:
- docker-compose exec dbbackup /restore.sh
- docker-compose exec dbbackup psql -l gis

before_script:
- ./build-test.sh

notifications:
irc:
channels:
Expand Down
16 changes: 16 additions & 0 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM kartoza/postgis:12.1
MAINTAINER [email protected]

RUN apt-get -y update; apt-get -y --no-install-recommends install postgresql-client cron
RUN touch /var/log/cron.log

COPY backups-cron /backups-cron
COPY backups.sh /backups.sh
COPY restore.sh /restore.sh
COPY start.sh /start.sh
RUN chmod 0755 /*.sh

ENTRYPOINT ["/bin/bash", "/start.sh"]
CMD ["/docker-entrypoint.sh"]


5 changes: 5 additions & 0 deletions build-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

./build.sh

docker build -t kartoza/pg-backup:12.0 -f Dockerfile.test .
1 change: 1 addition & 0 deletions docker-compose.override.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: '2.1'

services:
dbbackup:
image: kartoza/pg-backup:12.0
environment:
# Postgres environment variable
# Can be set to execute PG tools directly
Expand Down

0 comments on commit 4439b52

Please sign in to comment.