Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use chart-testing to lint the Helm Chart #2027

Merged
merged 3 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .ct.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
remote: origin
target-branch: main
lucacome marked this conversation as resolved.
Show resolved Hide resolved

check-version-increment: false
16 changes: 14 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,20 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Lint chart
run: make lint-helm
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: "3.x"
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1

- name: Run chart-testing
run: ct lint --print-config --config .ct.yaml

yaml-lint:
name: Yaml Lint
Expand Down
2 changes: 1 addition & 1 deletion .yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ yaml-files:
- "*.yml"

ignore:
- charts/nginx-gateway-fabric/templates
- charts/nginx-gateway-fabric/
lucacome marked this conversation as resolved.
Show resolved Hide resolved
- config/crd/bases/
- deploy/crds.yaml

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ njs-unit-test: ## Run unit tests for the njs httpmatches module

.PHONY: lint-helm
lint-helm: ## Run the helm chart linter
helm lint $(CHART_DIR)
docker run --pull always --rm -v $(CURDIR):/nginx-gateway-fabric -w /nginx-gateway-fabric quay.io/helmpack/chart-testing:latest ct lint --config .ct.yaml

.PHONY: load-images
load-images: ## Load NGF and NGINX images on configured kind cluster.
Expand Down
2 changes: 1 addition & 1 deletion charts/nginx-gateway-fabric/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ keywords:
- gateway
- nginx
maintainers:
- name: nginxinc
- name: nginxinc/nginx-gateway-fabric
email: [email protected]
Loading