2016-06-13 15:46:03 +03:00
|
|
|
set -ex
|
|
|
|
|
2016-10-04 00:45:44 +03:00
|
|
|
if [ ! -z "$DOCKER_IMAGE" ]
|
2016-09-06 13:07:10 +03:00
|
|
|
then
|
2016-10-04 00:45:44 +03:00
|
|
|
tag="$DOCKER_IMAGE/latest"
|
|
|
|
docker build $DOCKER_IMAGE -t $tag
|
|
|
|
docker run \
|
|
|
|
-e USER="$USER" \
|
|
|
|
-e TARGET="$TARGET" \
|
|
|
|
-e TOOLCHAIN="$TOOLCHAIN" \
|
|
|
|
-e DOCKER_IMAGE="$DOCKER_IMAGE" \
|
|
|
|
-e NAME="$NAME" \
|
|
|
|
-e TRAVIS_TAG="$TRAVIS_TAG" \
|
|
|
|
-e USER_ID=$(id -u) \
|
|
|
|
-e GROUP_ID=$(id -g) \
|
|
|
|
-v $PWD:/mnt/host \
|
|
|
|
-i $tag \
|
|
|
|
bash -s -- < build.sh
|
2016-09-06 13:07:10 +03:00
|
|
|
else
|
2016-10-04 00:45:44 +03:00
|
|
|
bash build.sh
|
2016-09-06 13:07:10 +03:00
|
|
|
fi
|