-
Notifications
You must be signed in to change notification settings - Fork 891
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1977 from calvin0327/add-chart-lint-ci
add chart lint ci workflow
- Loading branch information
Showing
3 changed files
with
78 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
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/[email protected] | ||
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/[email protected] | ||
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,17 +12,23 @@ description: A Helm chart for karmada | |
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# The optional kubeVersion field can define semver constraints on supported Kubernetes versions. | ||
# Helm will validate the version constraints when installing the chart and fail if the cluster | ||
# The optional kubeVersion field can define semver constraints on supported Kubernetes versions. | ||
# Helm will validate the version constraints when installing the chart and fail if the cluster | ||
# runs an unsupported Kubernetes version. | ||
kubeVersion: ">= 1.16.0-0" | ||
|
||
# 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. | ||
# 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 | ||
# 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. | ||
appVersion: v1.1.0 | ||
|
||
maintainers: | ||
- name: jrkeen | ||
email: [email protected] | ||
- name: pidb | ||
email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters