Skip to content

Commit 9674e63

Browse files
committed
feat(ci): add helm chart publisher
1 parent fbdc486 commit 9674e63

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: "[CI] Publish Charts"
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
publish-charts:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: "Setup Helm"
11+
uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # 4.3.0
12+
- name: "Publish Charts"
13+
run: hack/publish-charts.sh

charts/eks-node-monitoring-agent/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ This chart installs the [`eks-node-monitoring-agent`](https://github.com/aws/eks
1010
## Installing the Chart
1111

1212
```shell
13+
# using the github chart repository
14+
helm repo add eks-node-monitoring-agent https://aws.github.io/eks-node-monitoring-agent
15+
helm install eks-node-monitoring-agent eks-node-monitoring-agent/eks-node-monitoring-agent --namespace kube-system
16+
```
17+
18+
**OR**
19+
20+
```shell
21+
# using the chart sources
1322
git clone https://github.com/aws/eks-node-monitoring-agent.git
1423
cd eks-node-monitoring-agent
1524
helm install eks-node-monitoring-agent ./charts/eks-node-monitoring-agent --namespace kube-system

hack/publish-charts.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
GIT_REPO_ROOT=$(git rev-parse --show-toplevel)
5+
VERSION=$(git describe --tags --always)
6+
7+
STAGING_DIR=${1:-${GIT_REPO_ROOT}}
8+
CHART_URL=${2:-https://aws.github.io/eks-node-monitoring-agent}
9+
10+
helm package ${GIT_REPO_ROOT}/charts/* --destination ${STAGING_DIR} --dependency-update
11+
git checkout gh-pages
12+
mv ${STAGING_DIR}/*.tgz .
13+
helm repo index . --url ${CHART_URL}
14+
git add index.yaml *.tgz
15+
git commit -m "Publish charts ${VERSION}"
16+
git push origin gh-pages
17+
echo "✅ Published charts"

0 commit comments

Comments
 (0)