patch up some final missing CI build things

This commit is contained in:
Andrew Stanton-Nurse 2016-02-16 12:46:43 -08:00
parent f57605c4c3
commit 34b0b688f7
2 changed files with 14 additions and 0 deletions

View file

@ -16,6 +16,14 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
# Some things depend on HOME and it may not be set. We should fix those things, but until then, we just patch a value in
if [ -z "$HOME" ]; then
export HOME=$DIR/artifacts/home
[ ! -d "$HOME" ] || rm -Rf $HOME
mkdir -p $HOME
fi
while [[ $# > 0 ]]; do
lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in

View file

@ -75,6 +75,12 @@ fi
[ -z "$DOTNET_BUILD_CONTAINER_NAME" ] && DOTNET_BUILD_CONTAINER_NAME="dotnetcli-build-container"
[ -z "$DOCKER_HOST_SHARE_DIR" ] && DOCKER_HOST_SHARE_DIR=$(pwd)
# Make container names CI-specific if we're running in CI
# Jenkins
[ ! -z "$BUILD_TAG" ] && DOTNET_BUILD_CONTAINER_NAME="$BUILD_TAG"
# VSO
[ ! -z "$BUILD_BUILDID" ] && DOTNET_BUILD_CONTAINER_NAME="$BUILD_BUILDID"
# Build the docker container (will be fast if it is already built)
echo "Building Docker Container using Dockerfile: $DOCKERFILE"
docker build --build-arg USER_ID=$(id -u) -t $DOTNET_BUILD_CONTAINER_TAG $DOCKERFILE