diff --git a/.ct.yaml b/.ct.yaml new file mode 100644 index 000000000..6aa41828f --- /dev/null +++ b/.ct.yaml @@ -0,0 +1,4 @@ +remote: origin +target-branch: main + +check-version-increment: false diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 460336420..6fdb087dc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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 diff --git a/.yamllint.yaml b/.yamllint.yaml index a16b70fd0..18093520d 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -4,7 +4,7 @@ yaml-files: - "*.yml" ignore: - - charts/nginx-gateway-fabric/templates + - charts/nginx-gateway-fabric/ - config/crd/bases/ - deploy/crds.yaml diff --git a/Makefile b/Makefile index 6d76d7705..288b4eb56 100644 --- a/Makefile +++ b/Makefile @@ -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. diff --git a/charts/nginx-gateway-fabric/Chart.yaml b/charts/nginx-gateway-fabric/Chart.yaml index 1817c35a2..92d8fc8d6 100644 --- a/charts/nginx-gateway-fabric/Chart.yaml +++ b/charts/nginx-gateway-fabric/Chart.yaml @@ -14,5 +14,5 @@ keywords: - gateway - nginx maintainers: - - name: nginxinc + - name: nginxinc/nginx-gateway-fabric email: kubernetes@nginx.com