Refactor docker entrypoint to reduce potential for out of sync build and ci_build scripts
This commit is contained in:
parent
32e7a71a49
commit
cdf8b90494
2 changed files with 15 additions and 9 deletions
15
build.sh
15
build.sh
|
@ -22,5 +22,16 @@ fi
|
||||||
|
|
||||||
echo Building dotnet tools verison - $DOTNET_BUILD_VERSION
|
echo Building dotnet tools verison - $DOTNET_BUILD_VERSION
|
||||||
|
|
||||||
$DIR/scripts/bootstrap.sh
|
if [ ! -z "$BUILD_IN_DOCKER" ]; then
|
||||||
$DIR/scripts/package.sh
|
export BUILD_COMMAND="/opt/code/scripts/bootstrap.sh"
|
||||||
|
$DIR/scripts/dockerbuild.sh
|
||||||
|
else
|
||||||
|
$DIR/scripts/bootstrap.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$PACKAGE_IN_DOCKER" ]; then
|
||||||
|
export BUILD_COMMAND="/opt/code/scripts/package.sh"
|
||||||
|
$DIR/scripts/dockerbuild.sh
|
||||||
|
else
|
||||||
|
$DIR/scripts/package.sh
|
||||||
|
fi
|
|
@ -33,14 +33,9 @@ if [[ "$(uname)" == "Linux" ]]; then
|
||||||
[ ! -z "$BUILD_BUILDID" ] && container_name="$BUILD_BUILDID"
|
[ ! -z "$BUILD_BUILDID" ] && container_name="$BUILD_BUILDID"
|
||||||
|
|
||||||
export DOTNET_BUILD_CONTAINER_NAME="$container_name"
|
export DOTNET_BUILD_CONTAINER_NAME="$container_name"
|
||||||
|
export PACKAGE_IN_DOCKER="true"
|
||||||
|
|
||||||
# Build Binaries outside of Docker
|
$SCRIPT_DIR/../build.sh $@
|
||||||
$SCRIPT_DIR/bootstrap.sh $@
|
|
||||||
|
|
||||||
# Change Docker Build command to packaging only
|
|
||||||
export BUILD_COMMAND="/opt/code/scripts/package.sh"
|
|
||||||
$SCRIPT_DIR/dockerbuild.sh
|
|
||||||
|
|
||||||
else
|
else
|
||||||
$SCRIPT_DIR/../build.sh $@
|
$SCRIPT_DIR/../build.sh $@
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue