Skip to content

Commit a83e2c2

Browse files
authored
Merge pull request #9 from stefanprodan/helm-3.3.0
Update Helm to v3.3.0 and merge index
2 parents 76ba73d + 3f25ca1 commit a83e2c2

File tree

3 files changed

+28
-5
lines changed

3 files changed

+28
-5
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: test
22

33
on:
44
push:
5-
branch: 'master'
5+
branch:
6+
- 'master'
7+
- 'helm-*'
68

79
jobs:
810
release:

src/entrypoint.sh

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
#!/usr/bin/env bash
22

3+
# Copyright 2020 Stefan Prodan. All rights reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
317
set -o errexit
418
set -o pipefail
519

@@ -19,7 +33,7 @@ REPO_URL=""
1933

2034
main() {
2135
if [[ -z "$HELM_VERSION" ]]; then
22-
HELM_VERSION="3.2.1"
36+
HELM_VERSION="3.3.0"
2337
fi
2438

2539
if [[ -z "$CHARTS_DIR" ]]; then
@@ -114,7 +128,14 @@ upload() {
114128

115129
mkdir -p ${TARGET_DIR}
116130
mv -f ${CHARTS_TMP_DIR}/*.tgz ${TARGET_DIR}
117-
helm repo index ${TARGET_DIR} --url ${CHARTS_URL}
131+
132+
if [[ -f "${TARGET_DIR}/index.yaml" ]]; then
133+
echo "Found index, merging changes"
134+
helm repo index ${TARGET_DIR} --url ${CHARTS_URL} --merge "${TARGET_DIR}/index.yaml"
135+
else
136+
echo "No index found, generating a new one"
137+
helm repo index ${TARGET_DIR} --url ${CHARTS_URL}
138+
fi
118139

119140
git add ${TARGET_DIR}
120141
git commit -m "Publish $charts"

testdata/test1/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.1.0
18+
version: 0.2.0
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
23-
appVersion: 1.16.0
23+
appVersion: 1.17.0

0 commit comments

Comments
 (0)