Skip to content

Commit fc7b660

Browse files
committed
Use chart-testing for lint job
Signed-off-by: amr.farid222@gmail.com
1 parent 2efdb42 commit fc7b660

File tree

3 files changed

+19
-23
lines changed

3 files changed

+19
-23
lines changed

.github/workflows/lint.yaml

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,27 @@ jobs:
1414
- name: Checkout
1515
uses: actions/checkout@v2
1616
with:
17-
path: harbor
17+
fetch-depth: 0
1818

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

24-
- name: Helm version
25-
run:
26-
helm version -c
27-
28-
- name: Run lint
29-
continue-on-error: ${{ startsWith(matrix.helm_version, '2.') }}
30-
working-directory: ./harbor
31-
run:
32-
helm lint .
24+
- uses: actions/setup-python@v2
25+
with:
26+
python-version: 3.7
3327

34-
- name: Update dependency
35-
working-directory: ./harbor
36-
run:
37-
helm dependency update .
28+
- name: Set up chart-testing
29+
uses: helm/chart-testing-action@v2.3.0
3830

39-
- name: Run template for ingress expose
40-
working-directory: ./harbor
41-
run:
42-
helm template --set "expose.type=ingress" --output-dir $(mktemp -d -t output-XXXXXXXXXX) .
31+
- name: Run chart-testing (list-changed)
32+
id: list-changed
33+
run: |
34+
changed=$(ct list-changed)
35+
if [[ -n "$changed" ]]; then
36+
echo "::set-output name=changed::true"
37+
fi
4338
44-
- name: Run template for nodePort expose
45-
working-directory: ./harbor
46-
run:
47-
helm template --set "expose.type=nodePort,expose.tls.auto.commonName=127.0.0.1" --output-dir $(mktemp -d -t output-XXXXXXXXXX) .
39+
- name: Run chart-testing (lint)
40+
run: ct lint --charts . --validate-maintainers=false --lint-conf=lintconf.yaml

lintconf.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
rules:
2+
comments:
3+
require-starting-space: false

values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ jobservice:
523523
# - database
524524
# - stdout
525525
# The jobLogger sweeper duration (ignored if `jobLogger` is `stdout`)
526-
loggerSweeperDuration: 14 #days
526+
loggerSweeperDuration: 14 #days
527527

528528
# resources:
529529
# requests:

0 commit comments

Comments
 (0)