add chart lint ci workflow
Signed-off-by: calvin0327 <wen.chen@daocloud.io>
This commit is contained in:
parent
13319e539b
commit
5b521302e1
|
@ -0,0 +1,64 @@
|
||||||
|
# validate any chart changes under charts directory
|
||||||
|
name: Chart Lint
|
||||||
|
|
||||||
|
env:
|
||||||
|
HELM_VERSION: v3.8.1
|
||||||
|
KIND_VERSION: v0.12.0
|
||||||
|
KIND_NODE_IMAGE: kindest/node:v1.23.4
|
||||||
|
K8S_VERSION: v1.23.4
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "charts/karmada/**"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
chart-lint-test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Helm
|
||||||
|
uses: azure/setup-helm@v2.1
|
||||||
|
with:
|
||||||
|
version: ${{ env.HELM_VERSION }}
|
||||||
|
|
||||||
|
# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and
|
||||||
|
# yamllint (https://github.com/adrienverge/yamllint) which require Python
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.8
|
||||||
|
architecture: x64
|
||||||
|
|
||||||
|
- name: Set up chart-testing
|
||||||
|
uses: helm/chart-testing-action@v2.2.1
|
||||||
|
with:
|
||||||
|
version: v3.6.0
|
||||||
|
|
||||||
|
- 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 chart-testing (lint)
|
||||||
|
run: ct lint --debug --check-version-increment=false
|
||||||
|
|
||||||
|
- name: Create kind cluster
|
||||||
|
uses: helm/kind-action@v1.2.0
|
||||||
|
if: steps.list-changed.outputs.changed == 'true'
|
||||||
|
with:
|
||||||
|
wait: 120s
|
||||||
|
version: ${{ env.KIND_VERSION }}
|
||||||
|
node_image: ${{ env.KIND_NODE_IMAGE }}
|
||||||
|
kubectl_version: ${{ env.K8S_VERSION }}
|
||||||
|
|
||||||
|
- name: Run chart-testing (install)
|
||||||
|
run: ct install --debug --helm-extra-args "--timeout 400s"
|
|
@ -20,9 +20,15 @@ kubeVersion: ">= 1.16.0-0"
|
||||||
# This is the chart version. This version number should be incremented each time you make changes
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
# to the chart and its templates, including the app version.
|
# to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||||
version: 0.0.3
|
version: 0.0.4
|
||||||
|
|
||||||
# This is the version number of the application being deployed. This version number should be
|
# This is the version number of the application being deployed. This version number should be
|
||||||
# incremented each time you make changes to the application. Versions are not expected to
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
appVersion: v1.1.0
|
appVersion: v1.1.0
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- name: jrkeen
|
||||||
|
email: jrkeen@hotmail.com
|
||||||
|
- name: pidb
|
||||||
|
email: jackson.cloudnative@gmail.com
|
||||||
|
|
Loading…
Reference in New Issue