Skip to content

Commit 79b831f

Browse files
authored
Merge pull request #9 from Infisical/feat/add-helm-chart-oci-upload
improvement(helm): switch helm chart release to OCI push
2 parents 8c8dfdd + 9b38d71 commit 79b831f

4 files changed

Lines changed: 24 additions & 10 deletions

File tree

.github/workflows/release-helm-chart.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424

2525
- name: Set up chart-testing
2626
uses: helm/chart-testing-action@v2.7.0
27+
with:
28+
yamale_version: "6.0.0"
2729

2830
- name: Run chart-testing (lint)
2931
run: ct lint --config ct.yaml --charts helm-charts/infisical-pki-issuer
@@ -47,13 +49,8 @@ jobs:
4749
with:
4850
version: v3.10.0
4951

50-
- name: Install python
51-
uses: actions/setup-python@v4
52-
53-
- name: Install Cloudsmith CLI
54-
run: pip install --upgrade cloudsmith-cli
55-
5652
- name: Build and push helm package to CloudSmith
5753
run: cd helm-charts && sh upload-infisical-pki-issuer-chart.sh
5854
env:
5955
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
56+
CLOUDSMITH_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}

.github/workflows/run-helm-chart-tests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727

2828
- name: Set up chart-testing
2929
uses: helm/chart-testing-action@v2.7.0
30+
with:
31+
yamale_version: "6.0.0"
3032

3133
- name: Run chart-testing (lint)
3234
run: ct lint --config ct.yaml --charts helm-charts/infisical-pki-issuer

helm-charts/infisical-pki-issuer/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ type: application
1313
# This is the chart version. This version number should be incremented each time you make changes
1414
# to the chart and its templates, including the app version.
1515
# Versions are expected to follow Semantic Versioning (https://semver.org/)
16-
version: 0.1.0
16+
version: 0.1.1
1717
# This is the version number of the application being deployed. This version number should be
1818
# incremented each time you make changes to the application. Versions are not expected to
1919
# follow Semantic Versioning. They should reflect the version the application is using.
2020
# It is recommended to use it with quotes.
21-
appVersion: "0.1.0"
21+
appVersion: "0.1.1"
Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
1+
#!/usr/bin/env sh
2+
set -e
3+
4+
if [ -z "$CLOUDSMITH_API_KEY" ] || [ -z "$CLOUDSMITH_USERNAME" ]; then
5+
echo "Error: CLOUDSMITH_API_KEY and CLOUDSMITH_USERNAME environment variables must be set."
6+
exit 1
7+
fi
8+
19
cd infisical-pki-issuer
210
helm dependency update
311
helm package .
12+
13+
echo "$CLOUDSMITH_API_KEY" | helm registry login helm.oci.cloudsmith.io \
14+
--username "$CLOUDSMITH_USERNAME" \
15+
--password-stdin
16+
417
for i in *.tgz; do
518
[ -f "$i" ] || break
6-
cloudsmith push helm --republish infisical/helm-charts "$i"
19+
helm push "$i" oci://helm.oci.cloudsmith.io/infisical/helm-charts
720
done
8-
cd ..
21+
22+
helm registry logout helm.oci.cloudsmith.io
23+
cd ..

0 commit comments

Comments
 (0)