1
|
#!/bin/bash
|
1
|
#!/bin/bash
|
2
|
export PATH=/root/local/bin:$PATH
|
2
|
export PATH=/root/local/bin:$PATH
|
3
|
-kubectl -n mmm-suplus-dev get pods | grep -q mmm-partner
|
3
|
+kubectl -n mmm-suplus-dev get pods | grep -q mmmpartner
|
4
|
if [ "$?" == "1" ];then
|
4
|
if [ "$?" == "1" ];then
|
5
|
kubectl create -f /tmp/dev/partner/partner.yaml --record
|
5
|
kubectl create -f /tmp/dev/partner/partner.yaml --record
|
6
|
- kubectl -n mmm-suplus-dev get svc | grep -q mmm-partner
|
6
|
+ kubectl -n mmm-suplus-dev get svc | grep -q mmmpartner
|
7
|
if [ "$?" == "0" ];then
|
7
|
if [ "$?" == "0" ];then
|
8
|
- echo "mmm-partner service install success!"
|
8
|
+ echo "mmmpartner service install success!"
|
9
|
else
|
9
|
else
|
10
|
- echo "mmm-partner service install fail!"
|
10
|
+ echo "mmmpartner service install fail!"
|
11
|
fi
|
11
|
fi
|
12
|
- kubectl -n mmm-suplus-dev get pods | grep -q mmm-partner
|
12
|
+ kubectl -n mmm-suplus-dev get pods | grep -q mmmpartner
|
13
|
if [ "$?" == "0" ];then
|
13
|
if [ "$?" == "0" ];then
|
14
|
- echo "mmm-partner deployment install success!"
|
14
|
+ echo "mmmpartner deployment install success!"
|
15
|
else
|
15
|
else
|
16
|
- echo "mmm-partner deployment install fail!"
|
16
|
+ echo "mmmpartner deployment install fail!"
|
17
|
fi
|
17
|
fi
|
18
|
else
|
18
|
else
|
19
|
kubectl delete -f /tmp/dev/partner/partner.yaml
|
19
|
kubectl delete -f /tmp/dev/partner/partner.yaml
|
20
|
- kubectl -n mmm-suplus-dev get svc | grep -q mmm-partner
|
20
|
+ kubectl -n mmm-suplus-dev get svc | grep -q mmmpartner
|
21
|
while [ "$?" == "0" ]
|
21
|
while [ "$?" == "0" ]
|
22
|
do
|
22
|
do
|
23
|
- kubectl -n mmm-suplus-dev get svc | grep -q mmm-partner
|
23
|
+ kubectl -n mmm-suplus-dev get svc | grep -q mmmpartner
|
24
|
done
|
24
|
done
|
25
|
- kubectl -n mmm-suplus-dev get pods | grep -q mmm-partner
|
25
|
+ kubectl -n mmm-suplus-dev get pods | grep -q mmmpartner
|
26
|
while [ "$?" == "0" ]
|
26
|
while [ "$?" == "0" ]
|
27
|
do
|
27
|
do
|
28
|
- kubectl -n mmm-suplus-dev get pods | grep -q mmm-partner
|
28
|
+ kubectl -n mmm-suplus-dev get pods | grep -q mmmpartner
|
29
|
done
|
29
|
done
|
30
|
kubectl create -f /tmp/dev/partner/partner.yaml --record
|
30
|
kubectl create -f /tmp/dev/partner/partner.yaml --record
|
31
|
- kubectl -n mmm-suplus-dev get svc | grep -q mmm-partner
|
31
|
+ kubectl -n mmm-suplus-dev get svc | grep -q mmmpartner
|
32
|
if [ "$?" == "0" ];then
|
32
|
if [ "$?" == "0" ];then
|
33
|
- echo "mmm-partner service update success!"
|
33
|
+ echo "mmmpartner service update success!"
|
34
|
else
|
34
|
else
|
35
|
- echo "mmm-partner service update fail!"
|
35
|
+ echo "mmmpartner service update fail!"
|
36
|
fi
|
36
|
fi
|
37
|
- kubectl -n mmm-suplus-dev get pods | grep -q mmm-partner
|
37
|
+ kubectl -n mmm-suplus-dev get pods | grep -q mmmpartner
|
38
|
if [ "$?" == "0" ];then
|
38
|
if [ "$?" == "0" ];then
|
39
|
- echo "mmm-partner deployment update success!"
|
39
|
+ echo "mmmpartner deployment update success!"
|
40
|
else
|
40
|
else
|
41
|
- echo "mmm-partner deployment update fail!"
|
41
|
+ echo "mmmpartner deployment update fail!"
|
42
|
fi
|
42
|
fi
|
43
|
fi |
43
|
fi |