forked from SeldonIO/seldon-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-all-in-minikube
executable file
·37 lines (29 loc) · 973 Bytes
/
build-all-in-minikube
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
set -o nounset
set -o errexit
set -o pipefail
STARTUP_DIR="$( cd "$( dirname "$0" )" && pwd )"
function do_build {
local SELDON_CORE_VM_DIR=$1
eval $(minikube docker-env)
docker run --rm -it \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /home/docker/.m2:/root/.m2 \
-v ${SELDON_CORE_VM_DIR}:/work \
seldonio/core-builder:0.1 bash -c 'make -f Makefile.ci build'
}
SELDON_CORE_LOCAL_DIR=${STARTUP_DIR}
UNAME_S=$(uname -s)
SELDON_CORE_VM_DIR=UNKOWN
if [ ${UNAME_S} = "Darwin" ]; then
SELDON_CORE_VM_DIR=${SELDON_CORE_LOCAL_DIR}
fi
if [ ${UNAME_S} = "Linux" ]; then
SELDON_CORE_VM_DIR=$(echo ${SELDON_CORE_LOCAL_DIR}|sed -e 's|^/home/|/hosthome/|')
fi
echo "-------------------------------------------------"
echo "Translating paths"
echo "local: ${SELDON_CORE_LOCAL_DIR}"
echo " vm: ${SELDON_CORE_VM_DIR}"
echo "-------------------------------------------------"
do_build ${SELDON_CORE_VM_DIR}