-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepare-kube-ui.sh
executable file
·56 lines (44 loc) · 1.05 KB
/
prepare-kube-ui.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
ENV=$1 # Deployment environment
declare -a KUBE_PODS=("client-ui" "provider-ui" "website" "admin-global-ui" "admin-country-ui")
if [ "$ENV" != 'staging' ] && [ "$ENV" != 'prod' ]
then
echo "Please select deployment environment: staging | prod"
exit
fi
# Prepare all pods
for el in "${KUBE_PODS[@]}"
do
cd $el
if [ "$ENV" = 'staging' ]
then
git checkout staging
git pull origin development
# pull the components library
cd USupport-components-library
git checkout staging
git pull origin development
# install the components library
npm install
# install the current ui
cd ..
npm install
# build the ui
npm run staging
elif [ "$ENV" = 'prod' ]
then
git checkout main
git pull origin staging
# pull the components library
cd USupport-components-library
git checkout main
git pull origin staging
# install the components library
npm install
# install the current ui
cd ..
npm install
# build the ui
npm run build --prod
fi
cd ..
done