Skip to content

Commit

Permalink
fix: CI
Browse files Browse the repository at this point in the history
  • Loading branch information
darkweaver87 committed Jan 10, 2025
1 parent 4640d14 commit 8c81e5f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ jobs:
kubectl wait --namespace metallb-system --for=condition=ready pod --selector=app=metallb --timeout=90s
kubectl apply -f hack/metallb-config.yaml
- name: Check install on Kind
- name: Check install on Kind (standard)
if: steps.check.outputs.release
run: |
make test-install
- name: Check install on Kind (with CRDS)
if: steps.check.outputs.release
run: |
make test-install-with-crds
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ lint:
docs:
docker run --rm -v "$(CURDIR):/helm-docs" $(IMAGE_HELM_DOCS) -o VALUES.md

test-install:
docker run ${DOCKER_ARGS} --network=host --env GIT_SAFE_DIR="true" --entrypoint /bin/sh --rm -v $(CURDIR):/charts -v $(HOME)/.kube:/root/.kube -w /charts $(IMAGE_CHART_TESTING) /charts/hack/ct.sh install

test-%:
docker run ${DOCKER_ARGS} --network=host --env GIT_SAFE_DIR="true" --entrypoint /bin/sh --rm -v $(CURDIR):/charts -v $(HOME)/.kube:/root/.kube -w /charts $(IMAGE_CHART_TESTING) /charts/hack/ct.sh $*

# Requires to install schema generation plugin beforehand
# $ helm plugin install https://github.com/losisin/helm-values-schema-json.git
Expand Down
18 changes: 16 additions & 2 deletions hack/ct.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
#!/bin/bash

ACTION=$1

git config --global --add safe.directory /charts

ct $1 --config=.github/chart-testing.yaml --charts traefik/
ct $1 --config=.github/chart-testing.yaml --charts traefik-crds/
case "${ACTION}" in
install-with-crds)
ACTION="install"
ct "${ACTION}" --config=.github/chart-testing.yaml --charts traefik-crds/
ct" ${ACTION}" --config=.github/chart-testing.yaml --charts traefik/ --helm-extra-args '--skip-crds'
;;
install)
ct "${ACTION}" --config=.github/chart-testing.yaml --charts traefik/
;;
*)
ct "${ACTION}" --config=.github/chart-testing.yaml --charts traefik-crds/
ct "${ACTION}" --config=.github/chart-testing.yaml --charts traefik/
;;
esac

0 comments on commit 8c81e5f

Please sign in to comment.