-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpackage.sh
More file actions
executable file
·33 lines (33 loc) · 1.04 KB
/
package.sh
File metadata and controls
executable file
·33 lines (33 loc) · 1.04 KB
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
#!/usr/bin/env bash
set -o pipefail
# helm lint hkube/
CHART_VERSION=$(git describe --abbrev=0)
VALUES_YAML_PATH=hkube/values.yaml NEW_VALUES_YAML_PATH=hkube/values.yaml ./version-updater
APP_VERSION=$(grep systemversion hkube/values.yaml | awk -F': ' '{print $2}')
mkdir -p /tmp/helm-charts
helm dependency update hkube
helm package --app-version=${APP_VERSION} --version=${CHART_VERSION} -d /tmp/helm-charts hkube
git stash
git remote -v
git fetch
git checkout -b gh-pages origin/gh-pages
if [[ FROZEN_VERSION = 'true' ]]; then
TARGET=.
else
TARGET=./dev
fi
cp /tmp/helm-charts/hkube-${CHART_VERSION}.tgz $TARGET
helm repo index --merge $TARGET/index.yaml /tmp/helm-charts/
cp /tmp/helm-charts/index.yaml $TARGET
git add .
git commit -m "update charts"
git push
git checkout $BRANCH
git stash apply
echo git add hkube/values.yaml
git add hkube/values.yaml
echo git commit -m "update version to ${CHART_VERSION} [skip ci]"
git commit -m "update version to ${CHART_VERSION} [skip ci]"
git pull --no-commit
git commit -m "merge from $BRANCH [skip ci]"
git push