forked from codefresh-contrib/helm-promotion-sample-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.sh
38 lines (30 loc) · 801 Bytes
/
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
#!/bin/sh
set -x
set -e
echo "Name: $1"
echo "Tag: $2"
echo "Version: $3"
echo "Comment: $4"
if [ ! -f ../package/$1-$3.tgz ]; then
ls
pip install ruamel.yaml
python3 ./utils/update-image-tag-helm.py ./charts/$1/values.yaml $2
python3 ./utils/update-chart-version.py ./charts/$1/Chart.yaml 'version' $3
mkdir -p package
cd package
helm package ../charts/$1
helm repo index .
cd ..
cd ..
ls
mv master/package/* package/
cd package
git config user.email "noreply-bn@bhge.com"
git config user.name "helm"
git add -A
git diff --quiet && git diff --staged --quiet || git commit -m "Update repo [SKIP CI]" -m "$4"
git config pull.rebase false
git push
else
echo "Package exists"
fi