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 for helm chart linting workflow #1303

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
37 changes: 15 additions & 22 deletions .github/workflows/lint.yaml
Expand Up @@ -14,34 +14,27 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with:
path: harbor
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: '${{ matrix.helm_version }}'

- name: Helm version
run:
helm version -c

- name: Run lint
continue-on-error: ${{ startsWith(matrix.helm_version, '2.') }}
working-directory: ./harbor
run:
helm lint .
- uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Update dependency
working-directory: ./harbor
run:
helm dependency update .
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.3.0

- name: Run template for ingress expose
working-directory: ./harbor
run:
helm template --set "expose.type=ingress" --output-dir $(mktemp -d -t output-XXXXXXXXXX) .
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi

- name: Run template for nodePort expose
working-directory: ./harbor
run:
helm template --set "expose.type=nodePort,expose.tls.auto.commonName=127.0.0.1" --output-dir $(mktemp -d -t output-XXXXXXXXXX) .
- name: Run chart-testing (lint)
run: ct lint --charts . --validate-maintainers=false --lint-conf=lintconf.yaml
3 changes: 3 additions & 0 deletions lintconf.yaml
@@ -0,0 +1,3 @@
rules:
comments:
require-starting-space: false
2 changes: 1 addition & 1 deletion values.yaml
Expand Up @@ -523,7 +523,7 @@ jobservice:
# - database
# - stdout
# The jobLogger sweeper duration (ignored if `jobLogger` is `stdout`)
loggerSweeperDuration: 14 #days
loggerSweeperDuration: 14 #days

# resources:
# requests:
Expand Down