forked from juice-shop/multi-juicer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-an-deploy.sh
executable file
·32 lines (24 loc) · 1.27 KB
/
build-an-deploy.sh
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
#!/usr/bin/env bash
echo "This Script canbe used to 'easily' build all MultiJuicer Components and install them to a local kubernetes cluster"
echo "For this to work the local kubernetes cluster must have access to the same local registry / image cache which 'docker build ...' writes its image to"
echo "For example docker-desktop with its included k8s cluster"
echo "Usage: ./build-and-deploy.sh"
version="$(uuidgen)"
docker build --progress plain -t local/juice-balancer:$version ./juice-balancer &
docker build --progress plain -t local/cleaner:$version ./cleaner &
docker build --progress plain -t local/progress-watchdog:$version ./progress-watchdog &
wait
if [ "$(kubectl config current-context)" = "kind-kind" ]; then
kind load docker-image "local/progress-watchdog:$version" &
kind load docker-image "local/cleaner:$version" &
kind load docker-image "local/juice-balancer:$version" &
wait
fi
helm upgrade --install multi-juicer ./helm/multi-juicer \
--set="imagePullPolicy=IfNotPresent" \
--set="balancer.repository=local/juice-balancer" \
--set="balancer.tag=$version" \
--set="progressWatchdog.repository=local/progress-watchdog" \
--set="progressWatchdog.tag=$version" \
--set="juiceShopCleanup.repository=local/cleaner" \
--set="juiceShopCleanup.tag=$version"