* chore(helm): splitting utilities 1. peers -> handle peerjs connections 2. assist -> handle ws connections Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com> * build(utilities): rename utilities to assist Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com> * chore(build_deploy): include peers Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
32 lines
849 B
Bash
32 lines
849 B
Bash
#!/bin/bash
|
|
|
|
# Script to build api module
|
|
# flags to accept:
|
|
# Default will be OSS build.
|
|
|
|
# Usage: IMAGE_TAG=latest DOCKER_REPO=myDockerHubID bash build.sh <ee>
|
|
|
|
git_sha1=${IMAGE_TAG:-$(git rev-parse HEAD)}
|
|
check_prereq() {
|
|
which docker || {
|
|
echo "Docker not installed, please install docker."
|
|
exit=1
|
|
}
|
|
[[ exit -eq 1 ]] && exit 1
|
|
}
|
|
|
|
function build_api(){
|
|
# Copy enterprise code
|
|
[[ $1 == "ee" ]] && {
|
|
cp -rf ../ee/utilities/* ./
|
|
}
|
|
docker build -f ./Dockerfile -t ${DOCKER_REPO:-'local'}/assist:${git_sha1} .
|
|
[[ $PUSH_IMAGE -eq 1 ]] && {
|
|
docker push ${DOCKER_REPO:-'local'}/assist:${git_sha1}
|
|
docker tag ${DOCKER_REPO:-'local'}/assist:${git_sha1} ${DOCKER_REPO:-'local'}/assist:latest
|
|
docker push ${DOCKER_REPO:-'local'}/assist:latest
|
|
}
|
|
}
|
|
|
|
check_prereq
|
|
build_api $1
|