Skip to content

Commit

Permalink
use second Dockerfile to push 2nd image
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Aug 14, 2017
1 parent 76403f8 commit 050682a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .ci/travis/linux/before_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ set -e
pushd .docker

docker --version
docker-compose --version
docker-compose -f $DOCKER_COMPOSE config
#docker pull ubuntu:16.04
docker pull "qgis/qgis3-build-deps:${DOCKER_TAG}" || true
docker build --cache-from "qgis/qgis3-build-deps:${DOCKER_TAG}" -t "qgis/qgis3-build-deps:${DOCKER_TAG}" .
docker build --file deps-Dockerfile \
--cache-from "qgis/qgis3-build-deps:${DOCKER_TAG}"\
--tag "qgis/qgis3-build-deps:${DOCKER_TAG}" .
# image should be pushed even if QGIS build fails
# but push is achieved only on branches (not for PRs)
if [[ $DOCKER_PUSH =~ true ]]; then
Expand Down
3 changes: 0 additions & 3 deletions .ci/travis/linux/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,3 @@
# (at your option) any later version. #
# #
###########################################################################

shopt -s expand_aliases
alias python=python3
4 changes: 3 additions & 1 deletion .ci/travis/linux/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ pushd $DIR

mkdir -p $CCACHE_DIR

docker-compose -f $DOCKER_COMPOSE run --rm qgis-deps
docker-compose --version
docker-compose -f $DOCKER_COMPOSE config
docker-compose -f $DOCKER_COMPOSE run --rm qgis-build-and-test

popd
7 changes: 0 additions & 7 deletions .docker/Dockerfile → .docker/deps-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,3 @@ ENV QT_SELECT=5
# RUN ${CXX} --version

RUN apt-get install -y git

# RUN locale-gen en_US.UTF-8
# ENV LANG=en_US.UTF-8
# ENV LANGUAGE=en_US:en
# ENV LC_ALL=en_US.UTF-8

CMD /root/QGIS/.ci/travis/linux/docker-build-test.sh
8 changes: 6 additions & 2 deletions .docker/docker-compose.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ services:
environment:
- ALLOW_IP_RANGE="172.18.0.0/16"

qgis-deps:
qgis-build-and-test:
build:
context: .
dockerfile: build-Dockerfile
tty: true
image: qgis/qgis3-build-deps:${DOCKER_TAG}
image: qgis/qgis3-run:${DOCKER_TAG}
volumes:
- ${TRAVIS_BUILD_DIR}:/root/QGIS
- $HOME/.ccache:/root/.ccache # if changed, also change env var
links:
- postgres
environment:
- DOCKER_TAG=${DOCKER_TAG}
- CCACHE_DIR=/root/.ccache
- CTEST_BUILD_DIR=/root/QGIS
- TRAVIS_BRANCH=${TRAVIS_BRANCH}
Expand Down

0 comments on commit 050682a

Please sign in to comment.