forked from mojaloop/helm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.sh
96 lines (74 loc) · 2.34 KB
/
package.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/bin/bash
#
# Script to Package all charts, and created an index.yaml in ./repo directory
#
# Function to check the last command's result exited with a value of 0, otherwise the script will exit with a 1
function checkCommandResult () {
if [ $? -eq 0 ]; then
echo ""
else
echo "Command failed...exiting. Please fix me!";
exit 1
fi
}
echo "Removing old charts..."
find ./ -name "charts"| xargs rm -Rf
mkdir ./repo
echo "Packaging Central-KMS..."
helm package -u -d ./repo ./centralkms
checkCommandResult
echo "Packaging Forensic Logging Sidecar..."
helm package -u -d ./repo ./forensicloggingsidecar
checkCommandResult
echo "Packaging Central-Ledger..."
helm package -u -d ./repo ./centralledger
checkCommandResult
echo "Packaging Mock Pathfinder..."
helm package -u -d ./repo ./mockpathfinder
checkCommandResult
echo "Packaging Central-End-User-Registry..."
helm package -u -d ./repo ./centralenduserregistry
checkCommandResult
echo "Packaging Central-Directory..."
helm package -u -d ./repo ./centraldirectory
checkCommandResult
echo "Packaging Central-Settlement..."
helm package -u -d ./repo ./centralsettlement
checkCommandResult
echo "Packaging Email Notifier..."
helm package -u -d ./repo ./emailnotifier
checkCommandResult
echo "Packaging Central Event Processor..."
helm package -u -d ./repo ./centraleventprocessor
checkCommandResult
echo "Packaging Central..."
helm package -u -d ./repo ./central
checkCommandResult
echo "Packaging interop-switch..."
helm package -u -d ./repo ./interop-switch
checkCommandResult
echo "Packaging ml-api-adapter..."
helm package -u -d ./repo ./ml-api-adapter
checkCommandResult
echo "Packaging Mojaloop..."
helm package -u -d ./repo ./mojaloop
checkCommandResult
echo "Packaging Ingress-Nginx..."
helm package -u -d ./repo ./kube-public/ingress-nginx/
checkCommandResult
echo "Packaging ntpd..."
helm package -u -d ./repo ./kube-system/ntpd/
checkCommandResult
cd ./repo
echo "Creating Helm repo index..."
helm repo index . --url http://mojaloop.io/helm/repo
checkCommandResult
echo "\
Packaging completed.\n \
Ensure you check the output for any errors. \n \
Ignore any http errors when connecting to \"local\" chart repository.\n \
\n \
Run the following command to serve a local repository: helm serve --repo-path ./repo \n \
\n \
Happy Helming!
"