-
Notifications
You must be signed in to change notification settings - Fork 132
/
build-and-deploy.sh
executable file
·34 lines (25 loc) · 1.31 KB
/
build-and-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
33
#!/usr/bin/env bash
echo "This Script can be 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/cleaner:$version ./cleaner &
docker build --progress plain -t local/progress-watchdog:$version ./progress-watchdog &
docker build --progress plain -t local/balancer:$version ./balancer &
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/balancer:$version" &
wait
fi
helm upgrade --install multi-juicer ./helm/multi-juicer \
--set="imagePullPolicy=IfNotPresent" \
--set="balancer.repository=local/balancer" \
--set="balancer.tag=$version" \
--set="progressWatchdog.repository=local/progress-watchdog" \
--set="progressWatchdog.tag=$version" \
--set="juiceShopCleanup.repository=local/cleaner" \
--set="juiceShopCleanup.tag=$version" \
--set="balancer.cookie.cookieParserSecret=dev-secret"