-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to test charts in a local directory? #138
Comments
@KIVagant I agree that we should define defaults for both of these that are shipped with the binary. In the mean time, you could either use the docker image (which also comes with |
As a newbe to "chart-testing" i think you could use this one-liner: (after you did My expectation is that "charts-testing" searches for charts within that folder and in all sub-folders and i expect that it lists all found charts in the results:
So i guess i miss something. What command worked for you? |
Actual question for me too. I want to check local charts In CI.
In result I need to have running local helm repo for it. So, my general idea to check resources/requests for each places where possible (deployment templates, replicationcontroller templates, daemonset templates, etc..) in CI. Maybe someone know how to do it quickly? |
Please add the option to lint a local chart. I want to lint changes to my chart before I commit push to any remote/local chart repo. |
Maybe I'd like to make mysewlf clearer: Afaik, chart-testing needs a remote chart repository which it can compare changes to right ? (Please provide a documentation which explains the basic principles) |
I would also be interested in this. |
+1 |
I got it working locally by using docker and playing around with @ChristianWeissCG 's command: First grab the image: Then Inside the root of my repo I ran this command:
The repo looks somewhat like this:
chart-testing.yaml: chart-dirs:
- my-chart
charts:
- my-chart The section of my circleci config I use for CI testing: lint-charts:
docker:
- image: quay.io/helmpack/chart-testing:v3.3.1
steps:
- checkout
- run:
name: lint
command: |
ct lint --config .circleci/chart-testing.yaml |
if you have a chart in current directory and ct installed on the host then you can run: ct install --chart-dirs . --charts . With docker it works with: docker run -it --workdir=/data --volume ~/.kube/config:/root/.kube/config:ro --volume $(pwd):/data quay.io/helmpack/chart-testing:v3.5.0 ct install --chart-dirs . --charts . notice that workdir param is important and must be the same as volume mounted |
Also added yaml lint config and chart_schema files from: https://github.com/helm/chart-testing/tree/b060fc83f292a1ef7ea6f9db5a5834eb8a83b152/etc These files are required by chart-test's "lint" command. There does not appear to be any documentation about this. Refer to the following GitHub issue for more information: helm/chart-testing#138
Is this a request for help?:
Yes
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
No
Version of Helm and Kubernetes:
What happened:
What you expected to happen:
It should lint charts in the local directory. I have no idea how the
chart_schema.yaml
should look like.How to reproduce it (as minimally and precisely as possible):
ct lint --chart-dirs .
Thank you!
Update Same for
lintconf.yaml
. I believe the program should not require any specific configs to run it locally but just use some predefined settings.The text was updated successfully, but these errors were encountered: