Skip to content

Commit

Permalink
allow to save a Docker deps image for PR having [dockerdeps] in their…
Browse files Browse the repository at this point in the history
… title
  • Loading branch information
3nids committed Mar 2, 2018
1 parent 9580a88 commit bd149b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .ci/travis/linux/before_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ echo "travis_fold:start:travis_env"
echo "${bold}${endbold}"
echo "TRAVIS_BRANCH: $TRAVIS_BRANCH"
echo "TRAVIS_EVENT_TYPE: $TRAVIS_EVENT_TYPE"
echo "TRAVIS_COMMIT_MESSAGE (from git log): $(git log --format=%B --no-merges -n 1)"
echo "TRAVIS_COMMIT_MESSAGE: $TRAVIS_COMMIT_MESSAGE"
echo "DOCKER_TAG: $DOCKER_TAG"
echo "DOCKER_DEPS_PUSH: $DOCKER_DEPS_PUSH"
echo "DOCKER_DEPS_IMAGE_REBUILD: $DOCKER_DEPS_IMAGE_REBUILD"
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ matrix:
env:
- TRAVIS_CONFIG=linux
- DOCKER_COMPOSE=${TRAVIS_BUILD_DIR}/.docker/docker-compose.travis.yml
- DOCKER_TAG=$( [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && echo $TRAVIS_BRANCH | sed 's/master/latest/' || echo "latest" )
- DOCKER_DEPS_PUSH=$( [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && [[ $TRAVIS_EVENT_TYPE =~ push ]] && echo "true" || echo "false" )
- DOCKER_TAG=$(if [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]]; then if [[ $TRAVIS_EVENT_TYPE =~ push ]]; then echo $TRAVIS_BRANCH | sed 's/master/latest/'; elif [[ $TRAVIS_EVENT_TYPE =~ pull_request ]] && [[ `git log --format=%B --no-merges -n 1` =~ \[dockerdeps\] ]]; then echo "PR-$TRAVIS_PULL_REQUEST"; else echo "latest"; fi; else echo "latest"; fi)
- DOCKER_DEPS_PUSH=$(if [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && [[ $TRAVIS_EVENT_TYPE =~ push ]] || [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && [[ $TRAVIS_EVENT_TYPE =~ pull_request ]] && [[ `git log --format=%B --no-merges -n 1` =~ \[dockerdeps\] ]]; then echo "true"; else echo "false"; fi )
- 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_REPO_SLUG =~ qgis/QGIS ]] && [[ $TRAVIS_EVENT_TYPE =~ cron ]] && echo "true" || echo "false" )
Expand Down

0 comments on commit bd149b9

Please sign in to comment.