Skip to content

Commit

Permalink
Use chart-testing for lint job
Browse files Browse the repository at this point in the history
Signed-off-by: amr.farid222@gmail.com
  • Loading branch information
afarid committed Sep 17, 2022
1 parent 2efdb42 commit c48b10d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 23 deletions.
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

0 comments on commit c48b10d

Please sign in to comment.