CI: Rework chart linting.
This commit is contained in:
parent
6f73ff15c5
commit
8c01f1eb74
2 changed files with 27 additions and 13 deletions
14
.github/workflows/chart.yaml
vendored
14
.github/workflows/chart.yaml
vendored
|
@ -30,6 +30,15 @@ jobs:
|
||||||
- name: Set up Helm
|
- name: Set up Helm
|
||||||
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
|
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
|
||||||
|
|
||||||
|
- name: Set up Helm Chart Testing
|
||||||
|
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
|
||||||
|
|
||||||
|
- name: Set up Artifact Hub
|
||||||
|
run: |
|
||||||
|
curl --fail --location https://github.com/artifacthub/hub/releases/download/v1.19.0/ah_1.19.0_linux_amd64.tar.gz --output /tmp/ah.tar.gz
|
||||||
|
echo "0e430493521ce387ca04d79b26646a86f92886dbcceb44985bb71082a9530ca5 /tmp/ah.tar.gz" | shasum --check
|
||||||
|
sudo tar --extract --file /tmp/ah.tar.gz --directory /usr/local/bin ah
|
||||||
|
|
||||||
- name: Checkout master
|
- name: Checkout master
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
with:
|
with:
|
||||||
|
@ -43,6 +52,11 @@ jobs:
|
||||||
git config --global user.name "$GITHUB_ACTOR"
|
git config --global user.name "$GITHUB_ACTOR"
|
||||||
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
||||||
|
|
||||||
|
- name: Lint chart
|
||||||
|
run: |
|
||||||
|
ct lint --config .ct.yaml
|
||||||
|
ah lint --path charts/ingress-nginx
|
||||||
|
|
||||||
- name: Helm Chart Releaser
|
- name: Helm Chart Releaser
|
||||||
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0
|
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0
|
||||||
env:
|
env:
|
||||||
|
|
26
.github/workflows/ci.yaml
vendored
26
.github/workflows/ci.yaml
vendored
|
@ -209,14 +209,20 @@ jobs:
|
||||||
- name: Set up Helm
|
- name: Set up Helm
|
||||||
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
|
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
|
||||||
|
|
||||||
|
- name: Set up Helm Chart Testing
|
||||||
|
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
|
||||||
|
|
||||||
|
- name: Set up Artifact Hub
|
||||||
|
run: |
|
||||||
|
curl --fail --location https://github.com/artifacthub/hub/releases/download/v1.19.0/ah_1.19.0_linux_amd64.tar.gz --output /tmp/ah.tar.gz
|
||||||
|
echo "0e430493521ce387ca04d79b26646a86f92886dbcceb44985bb71082a9530ca5 /tmp/ah.tar.gz" | shasum --check
|
||||||
|
sudo tar --extract --file /tmp/ah.tar.gz --directory /usr/local/bin ah
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up chart-testing
|
|
||||||
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
|
|
||||||
|
|
||||||
- name: Install Helm Unit Test Plugin
|
- name: Install Helm Unit Test Plugin
|
||||||
run: |
|
run: |
|
||||||
helm plugin install https://github.com/helm-unittest/helm-unittest
|
helm plugin install https://github.com/helm-unittest/helm-unittest
|
||||||
|
@ -225,8 +231,10 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
helm unittest charts/ingress-nginx -d
|
helm unittest charts/ingress-nginx -d
|
||||||
|
|
||||||
- name: Run chart-testing (lint)
|
- name: Lint chart
|
||||||
run: ct lint --config ./.ct.yaml
|
run: |
|
||||||
|
ct lint --config .ct.yaml
|
||||||
|
ah lint --path charts/ingress-nginx
|
||||||
|
|
||||||
- name: Run helm-docs
|
- name: Run helm-docs
|
||||||
run: |
|
run: |
|
||||||
|
@ -239,14 +247,6 @@ jobs:
|
||||||
git diff --exit-code
|
git diff --exit-code
|
||||||
rm -f ./helm-docs
|
rm -f ./helm-docs
|
||||||
|
|
||||||
- name: Run Artifact Hub lint
|
|
||||||
run: |
|
|
||||||
wget https://github.com/artifacthub/hub/releases/download/v1.5.0/ah_1.5.0_linux_amd64.tar.gz
|
|
||||||
echo 'ad0e44c6ea058ab6b85dbf582e88bad9fdbc64ded0d1dd4edbac65133e5c87da *ah_1.5.0_linux_amd64.tar.gz' | shasum -c
|
|
||||||
tar -xzvf ah_1.5.0_linux_amd64.tar.gz ah
|
|
||||||
./ah lint -p charts/ingress-nginx || exit 1
|
|
||||||
rm -f ./ah ./ah_1.5.0_linux_amd64.tar.gz
|
|
||||||
|
|
||||||
chart-test:
|
chart-test:
|
||||||
name: Chart / Test
|
name: Chart / Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
Loading…
Reference in a new issue