Skip to content
Permalink
Browse files

fix docker variables in Travis (take 2)

  • Loading branch information
3nids committed Mar 21, 2018
1 parent 0fa1f04 commit fe6654e555f870e071a13e5857d35196479121e5
Showing with 10 additions and 8 deletions.
  1. +2 −2 .ci/travis/linux/before_script.sh
  2. +2 −2 .ci/travis/linux/script.sh
  3. +6 −4 .ci/travis/scripts/travis_envvar_helper.sh
@@ -23,7 +23,7 @@ source $(git rev-parse --show-toplevel)/.ci/travis/scripts/travis_envvar_helper.
DOCKER_DEPS_PUSH=$( [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && [[ $TRAVIS_EVENT_TYPE =~ push ]] && 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=create_qgis_image
DOCKER_QGIS_IMAGE_BUILD_PUSH=$(create_qgis_image)
QGIS_LAST_BUILD_SUCCESS=true # TODO use API to know if last build succeed https://developer.travis-ci.com/resource/builds


@@ -43,7 +43,7 @@ echo "travis_fold:end:travis_env"
echo "travis_fold:start:docker_build"
echo "${bold}Docker build deps${endbold}"
docker --version
if [[ $DOCKER_QGIS_IMAGE_BUILD_PUSH -eq 0 ]]; then
if [[ $DOCKER_QGIS_IMAGE_BUILD_PUSH =~ false ]]; then
docker-compose --version
docker-compose -f $DOCKER_COMPOSE config
fi
@@ -17,11 +17,11 @@ set -e

source $(git rev-parse --show-toplevel)/.ci/travis/scripts/travis_envvar_helper.sh

DOCKER_QGIS_IMAGE_BUILD_PUSH=create_qgis_image
DOCKER_QGIS_IMAGE_BUILD_PUSH=$(create_qgis_image)

mkdir -p $CCACHE_DIR

if [[ $DOCKER_QGIS_IMAGE_BUILD_PUSH -eq 1 ]]; then
if [[ $DOCKER_QGIS_IMAGE_BUILD_PUSH =~ true ]]; then
DIR=$(git rev-parse --show-toplevel)/.docker
pushd ${DIR}
echo "${bold}Building QGIS Docker image '${DOCKER_TAG}'...${endbold}"
@@ -1,12 +1,14 @@
#!/usr/bin/env bash

function create_qgis_image {
create_qgis_image () {

if [[ ! $TRAVIS_REPO_SLUG =~ qgis/QGIS ]]; then
return 0
echo false
return
fi
if [[ $TRAVIS_EVENT_TYPE =~ cron ]] || [[ -n $TRAVIS_TAG ]]; then
return 1;
echo true
return
fi
return 0;
echo false
}

0 comments on commit fe6654e

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