Skip to content

Commit

Permalink
ci: generated chart examples check
Browse files Browse the repository at this point in the history
  • Loading branch information
arttor committed Nov 6, 2024
1 parent 56a8017 commit 93f5c1a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
# Generate example charts
- name: Generate example charts
run: |
cat test_data/sample-app.yaml | go run ./cmd/helmify examples/app
cat test_data/k8s-operator-kustomize.output | go run ./cmd/helmify examples/operator
- name: Check that chart examples were commited
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "::error::Chart examples generation step has uncommitted changes. Please run following commands and commit the results:
- \`cat test_data/sample-app.yaml | go run ./cmd/helmify examples/app\`
- \`cat test_data/k8s-operator-kustomize.output | go run ./cmd/helmify examples/operator\`"
exit 1
else
echo "Chart examples generation check passed. No uncommitted changes."
fi
# Dry-run generated charts in cluster
- name: Install k8s cluster
uses: helm/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions test_data/sample-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ spec:
- name: app
args:
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
# - --metrics-bind-address=127.0.0.1:8080
# - --leader-elect
command:
- /manager
volumeMounts:
Expand Down

0 comments on commit 93f5c1a

Please sign in to comment.