Skip to content

Commit 9886987

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

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-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+
check-generate:
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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ This chart installs the [`eks-node-monitoring-agent`](https://github.com/aws/eks
99

1010
## Installing the Chart
1111

12+
```shell
13+
helm repo add eks-node-monitoring-agent https://aws.github.io/eks-node-monitoring-agent
14+
helm install eks-node-monitoring-agent eks-node-monitoring-agent/eks-node-monitoring-agent --namespace kube-system
15+
```
16+
17+
**OR**
18+
1219
```shell
1320
git clone https://github.com/aws/eks-node-monitoring-agent.git
1421
cd eks-node-monitoring-agent

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)