From 69923a293eb3b84ca8f43077e2e41f28e59c70b8 Mon Sep 17 00:00:00 2001 From: Amr Farid Date: Sat, 17 Sep 2022 21:41:20 +0200 Subject: [PATCH] Use chart-testing for lint job Signed-off-by: Amr Farid --- .github/workflows/lint.yaml | 37 +++++++++++++++---------------------- lintconf.yaml | 3 +++ values.yaml | 2 +- 3 files changed, 19 insertions(+), 23 deletions(-) create mode 100644 lintconf.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index ce6af8c28..878585637 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -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 diff --git a/lintconf.yaml b/lintconf.yaml new file mode 100644 index 000000000..e9d2836b8 --- /dev/null +++ b/lintconf.yaml @@ -0,0 +1,3 @@ +rules: + comments: + require-starting-space: false diff --git a/values.yaml b/values.yaml index 813e82238..27de3859b 100644 --- a/values.yaml +++ b/values.yaml @@ -523,7 +523,7 @@ jobservice: # - database # - stdout # The jobLogger sweeper duration (ignored if `jobLogger` is `stdout`) - loggerSweeperDuration: 14 #days + loggerSweeperDuration: 14 #days # resources: # requests: