Skip to content
Permalink
Browse files

correctly set working path

  • Loading branch information
3nids committed Feb 27, 2018
1 parent 7855682 commit f3b05906d900b6ef5c9035f889143e045f0bf700
Showing with 12 additions and 8 deletions.
  1. +6 −2 .ci/travis/linux/script.sh
  2. +5 −5 .docker/qgis.dockerfile
  3. +1 −1 .travis.yml
@@ -22,8 +22,12 @@ mkdir -p $CCACHE_DIR
if [[ $DOCKER_QGIS_IMAGE_BUILD_PUSH =~ true ]]; then
DIR=$(git rev-parse --show-toplevel)/.docker
pushd ${DIR}
echo "${bold}Building QGIS Docker image...${endbold}"
docker build --build-arg CACHE_DIR=/root/.ccache --cache-from "qgis/qgis:${DOCKER_TAG}" -t "qgis/qgis:${DOCKER_TAG}" -f qgis.dockerfile .
echo "${bold}Building QGIS Docker image '${DOCKER_TAG}'...${endbold}"
docker build --build-arg CACHE_DIR=/root/.ccache \
--build-arg DOCKER_TAG=${DOCKER_TAG} \
--cache-from "qgis/qgis:${DOCKER_TAG}" \
-t "qgis/qgis:${DOCKER_TAG}" \
-f qgis.dockerfile ..
echo "${bold}Pushing image to docker hub...${endbold}"
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
docker push "qgis/qgis:${DOCKER_TAG}"
@@ -2,20 +2,20 @@
# CACHE_TAG is provided by Docker cloud
# see https://docs.docker.com/docker-cloud/builds/advanced/
# using ARG in FROM requires min v17.05.0-ce
ARG CACHE_TAG=latest
ARG CCACHE_DIR
ARG DOCKER_TAG=latest
ARG CACHE_DIR

FROM qgis/qgis3-build-deps:${CACHE_TAG}
FROM qgis/qgis3-build-deps:${DOCKER_TAG}
MAINTAINER Denis Rouzaud <denis.rouzaud@gmail.com>

ENV CC=/usr/lib/ccache/clang
ENV CXX=/usr/lib/ccache/clang++
ENV QT_SELECT=5
ENV LANG=C.UTF-8

COPY .. /usr/src/QGIS
COPY . /usr/src/QGIS

COPY $CACHE_DIR /root/.ccache
COPY ${CACHE_DIR} /root/.ccache
ENV CCACHE_DIR=/root/.ccache
RUN ccache -M 1G

@@ -12,7 +12,7 @@ matrix:
- DOCKER_DEPS_PUSH=$( [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && [[ $TRAVIS_PULL_REQUEST =~ false ]] && echo "true" || echo "false" )
- DOCKER_DEPS_IMAGE_REBUILD=$( [[ $TRAVIS_COMMIT_MESSAGE =~ '[docker] update dependencies' ]] && echo "true" || echo "false" )
# on cron job, QGIS image is built and push without testing
- DOCKER_QGIS_IMAGE_BUILD_PUSH=$( [[ $TRAVIS_EVENT_TYPE =~ cron ]] && echo "true" || echo "true" ) # TODO: else false
- DOCKER_QGIS_IMAGE_BUILD_PUSH=$( [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && [[ $TRAVIS_EVENT_TYPE =~ cron ]] && echo "true" || echo "true" ) # TODO: else false
- QGIS_LAST_BUILD_SUCCESS=true # TODO use API to know if last build succeed https://developer.travis-ci.com/resource/builds
- CCACHE_DIR=${HOME}/.ccache
dist: trusty

0 comments on commit f3b0590

Please sign in to comment.
You can’t perform that action at this time.