Skip to content

Commit

Permalink
remove dependencies from Chart.yaml when present in order to run conf…
Browse files Browse the repository at this point in the history
…test
  • Loading branch information
max-rocket-internet committed Jan 7, 2025
1 parent 13ebe24 commit a784f57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/helm-conftest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
uses: actions/checkout@v4.1.7

- name: Install Dependencies
run: apk add --no-cache curl tar
run: apk add --no-cache curl tar yq

- name: Install Conftest
run: |
Expand Down
3 changes: 3 additions & 0 deletions ci/helm-conftest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ while IFS= read -r -d '' chart
do
echo "=============================================================="
echo "helm-conftest running for chart: ${chart}..."

# Remove any dependencies as we are not going to test them
rm -f "${chart}/requirements.yaml"
rm -rf "${chart}/charts"
yq -i 'del(.dependencies)' "${chart}/Chart.yaml"

helm template "${chart}" | conftest -p ci/helm-conftest-policies test -
done < <(find stable -maxdepth 1 -mindepth 1 -print0)

0 comments on commit a784f57

Please sign in to comment.