Android Docker: give the docker build its own output tree

Again, this is relevant for developers that do local docker android
builds, and normal android builds. A normal build uses the directory
subsurface-mobile-build-arm(64), and when doing a docker android build
this directory is shared between host and container. That sharing is
good, as it nicely exposes the build tree to the host (for easy compare,
inspection, etc.). But reusing the same tree as the local one is
inconvenient (and possibly dangerous due to all kinds of caching
issues).

So, give the docker build its own output tree for the shared
subsurface-mobile-build-arm(64) build output.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
Jan Mulder 2018-12-29 09:01:06 +01:00 committed by Dirk Hohndel
parent 1e1457318c
commit 63498df1bc
3 changed files with 7 additions and 7 deletions

View file

@ -8,8 +8,8 @@ fi
source ${TRAVIS_BUILD_DIR}/scripts/release-message.sh
echo "Submitting the folloing apk for continuous build release:"
ls -lh ../subsurface-mobile-build-arm*/build/outputs/apk/*.apk
ls -lh ../subsurface-mobile-build-docker-arm*/build/outputs/apk/*.apk
# get and run the upload script
wget -c https://raw.githubusercontent.com/dirkhh/uploadtool/master/upload.sh
bash ./upload.sh ../subsurface-mobile-build-arm*/build/outputs/apk/*.apk
bash ./upload.sh ../subsurface-mobile-build-docker-arm*/build/outputs/apk/*.apk

View file

@ -7,16 +7,16 @@ git pull --tags
git describe
# setup build dir on the host, not inside of the container
mkdir -p ../subsurface-mobile-build-arm
mkdir -p ../subsurface-mobile-build-arm64
mkdir -p ../subsurface-mobile-build-docker-arm
mkdir -p ../subsurface-mobile-build-docker-arm64
# this uses a custom built Ubuntu image that includes Qt for Android and
# Android NDK/SDK
# Running sleep to keep the container running during the build
PARENT="$( cd .. && pwd )"
docker run -v $PWD:/android/subsurface \
-v $PARENT/subsurface-mobile-build-arm:/android/subsurface-mobile-build-arm \
-v $PARENT/subsurface-mobile-build-arm64:/android/subsurface-mobile-build-arm64 \
-v $PARENT/subsurface-mobile-build-docker-arm:/android/subsurface-mobile-build-arm \
-v $PARENT/subsurface-mobile-build-docker-arm64:/android/subsurface-mobile-build-arm64 \
--name=android-builder \
-w /android \
-d dirkhh/android-builder:5.12.02 \

View file

@ -8,4 +8,4 @@ set -e
# (but of course having the right things in place will save a ton of time)
docker exec -e TRAVIS="$TRAVIS" -t android-builder subsurface/packaging/android/android-build-wrapper.sh
ls -l ../subsurface-mobile-build-arm*/build/outputs/apk/
ls -l ../subsurface-mobile-build-docker-arm*/build/outputs/apk/