forked from jonhawkes/sample.microservicebuilder.web-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cleanAndDeleteConferenceApp.sh
52 lines (40 loc) · 1.03 KB
/
cleanAndDeleteConferenceApp.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
#!/bin/bash
# This script uninstalls helm charts, clean maven artifacts and also removes docker images.
docker rm -v $(docker ps -a -q -f "status=exited")
docker rmi $(docker images -f "dangling=true" -q)
echo "Delete web-application"
cd "$(dirname "$0")"
helm delete web-app --purge
sleep 30
mvn clean
docker rmi -f web-application
sleep 10
echo "Delete microservice-session"
cd ../*session
helm delete session --purge
sleep 30
mvn clean
docker rmi -f microservice-session
sleep 10
echo "Delete microservice-speaker"
cd ../*speaker
helm delete speaker --purge
sleep 30
mvn clean
docker rmi -f microservice-speaker
sleep 10
echo "Delete microservice-schedule"
cd ../*schedule
helm delete schedule --purge
sleep 30
mvn clean
docker rmi -f microservice-schedule
sleep 10
echo "Delete microservice-vote"
cd ../*vote
helm delete vote --purge
sleep 30
mvn clean
docker rmi -f microservice-vote
docker rm -v $(docker ps -a -q -f "status=exited")
docker rmi $(docker images -f "dangling=true" -q)