mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 11:21:52 +08:00
(shards): remove build.sh
This commit is contained in:
parent
3845d970fe
commit
066952ca23
@ -1,39 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
BOLD=`tput bold`
|
||||
NORMAL=`tput sgr0`
|
||||
YELLOW='\033[1;33m'
|
||||
ENDC='\033[0m'
|
||||
|
||||
echo -e "${BOLD}MISHARDS_REGISTRY=${MISHARDS_REGISTRY}${ENDC}"
|
||||
|
||||
function build_image() {
|
||||
dockerfile=$1
|
||||
remote_registry=$2
|
||||
tagged=$2
|
||||
buildcmd="docker build -t ${tagged} -f ${dockerfile} ."
|
||||
echo -e "${BOLD}$buildcmd${NORMAL}"
|
||||
$buildcmd
|
||||
pushcmd="docker push ${remote_registry}"
|
||||
echo -e "${BOLD}$pushcmd${NORMAL}"
|
||||
$pushcmd
|
||||
echo -e "${YELLOW}${BOLD}Image: ${remote_registry}${NORMAL}${ENDC}"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
||||
all)
|
||||
[[ -z $MISHARDS_REGISTRY ]] && {
|
||||
echo -e "${YELLOW}Error: Please set docker registry first:${ENDC}\n\t${BOLD}export MISHARDS_REGISTRY=xxxx\n${ENDC}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
version=""
|
||||
[[ ! -z $2 ]] && version=":${2}"
|
||||
build_image "Dockerfile" "${MISHARDS_REGISTRY}${version}" "${MISHARDS_REGISTRY}"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: [option...] {base | apps}"
|
||||
echo "all, Usage: build.sh all [tagname|] => {docker_registry}:\${tagname}"
|
||||
;;
|
||||
esac
|
||||
Loading…
x
Reference in New Issue
Block a user