🔧 Updated .travis.yml

This commit is contained in:
Guillaume Jacquenot 2019-12-24 00:02:49 +01:00
parent 515dd2a18c
commit a90f8f1d8c

View File

@ -12,7 +12,9 @@ before_script:
- docker pull gjacquenot/openstreetmap-tile-server || true - docker pull gjacquenot/openstreetmap-tile-server || true
script: script:
- docker build --pull --cache-from gjacquenot/openstreetmap-tile-server --tag gjacquenot/openstreetmap-tile-server . - docker build --pull --cache-from gjacquenot/openstreetmap-tile-server --tag gjacquenot/openstreetmap-tile-server .
- touch build && make DOCKER_IMAGE=gjacquenot/openstreetmap-tile-server test - docker volume create openstreetmap-data
- docker run --rm -v openstreetmap-data:/var/lib/postgresql/12/main gjacquenot/openstreetmap-tile-server import
- docker run --rm -v openstreetmap-data:/var/lib/postgresql/12/main -p 80:80 -d gjacquenot/openstreetmap-tile-server run
- sleep 30 - sleep 30
- make DOCKER_IMAGE=gjacquenot/openstreetmap-tile-server stop - make DOCKER_IMAGE=gjacquenot/openstreetmap-tile-server stop
after_script: after_script:
@ -21,7 +23,7 @@ after_success:
- if [[ "$TRAVIS_BRANCH" == "master" ]]; - if [[ "$TRAVIS_BRANCH" == "master" ]];
then then
docker images ; docker images ;
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD ; echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin ;
docker push gjacquenot/openstreetmap-tile-server ; docker push gjacquenot/openstreetmap-tile-server ;
fi fi
notifications: notifications: