2016-06-03 10:16:00 +02:00
|
|
|
###########################################################################
|
|
|
|
# before_script.sh
|
|
|
|
# ---------------------
|
|
|
|
# Date : August 2015
|
|
|
|
# Copyright : (C) 2015 by Nyall Dawson
|
|
|
|
# Email : nyall dot dawson at gmail dot com
|
|
|
|
###########################################################################
|
|
|
|
# #
|
|
|
|
# This program is free software; you can redistribute it and/or modify #
|
|
|
|
# it under the terms of the GNU General Public License as published by #
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or #
|
|
|
|
# (at your option) any later version. #
|
|
|
|
# #
|
|
|
|
###########################################################################
|
|
|
|
|
2017-08-05 00:03:33 +02:00
|
|
|
set -e
|
2016-02-17 11:29:49 +01:00
|
|
|
|
2017-08-05 00:03:33 +02:00
|
|
|
pushd .docker
|
|
|
|
|
2017-10-25 18:17:10 +02:00
|
|
|
echo "travis_fold:start:docker"
|
2017-08-05 00:03:33 +02:00
|
|
|
docker --version
|
2017-08-15 08:45:13 +02:00
|
|
|
docker-compose --version
|
|
|
|
docker-compose -f $DOCKER_COMPOSE config
|
2017-08-05 00:03:33 +02:00
|
|
|
#docker pull ubuntu:16.04
|
|
|
|
docker pull "qgis/qgis3-build-deps:${DOCKER_TAG}" || true
|
2017-08-15 08:45:13 +02:00
|
|
|
docker build --cache-from "qgis/qgis3-build-deps:${DOCKER_TAG}" -t "qgis/qgis3-build-deps:${DOCKER_TAG}" .
|
2017-10-25 18:17:10 +02:00
|
|
|
echo "travis_fold:end:docker"
|
2017-08-05 00:03:33 +02:00
|
|
|
# image should be pushed even if QGIS build fails
|
|
|
|
# but push is achieved only on branches (not for PRs)
|
|
|
|
if [[ $DOCKER_PUSH =~ true ]]; then
|
|
|
|
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
|
|
|
|
#docker tag "qgis/qgis3-build-deps:${DOCKER_TAG}" "qgis/qgis3-build-deps:latest"
|
|
|
|
docker push "qgis/qgis3-build-deps:${DOCKER_TAG}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
popd
|