{"id":13451592,"url":"https://github.com/helm/chart-testing","last_synced_at":"2025-05-13T16:10:10.404Z","repository":{"id":39005258,"uuid":"112638589","full_name":"helm/chart-testing","owner":"helm","description":"CLI tool for linting and testing Helm charts","archived":false,"fork":false,"pushed_at":"2025-04-10T13:51:17.000Z","size":1043,"stargazers_count":1480,"open_issues_count":12,"forks_count":232,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-04-23T20:54:22.893Z","etag":null,"topics":["docker","golang","helm","kubernetes","linting","testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/helm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"code-of-conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-11-30T17:10:43.000Z","updated_at":"2025-04-23T16:59:18.000Z","dependencies_parsed_at":"2023-02-19T13:00:52.238Z","dependency_job_id":"891a5824-e8d4-418c-8494-e0480b45934b","html_url":"https://github.com/helm/chart-testing","commit_stats":{"total_commits":371,"total_committers":66,"mean_commits":5.621212121212121,"dds":0.5956873315363882,"last_synced_commit":"65fa127f1d9c3972fc0bfbe41332b6c5d1d9665f"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helm%2Fchart-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helm%2Fchart-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helm%2Fchart-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helm%2Fchart-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helm","download_url":"https://codeload.github.com/helm/chart-testing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250514767,"owners_count":21443208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","golang","helm","kubernetes","linting","testing"],"created_at":"2024-07-31T07:00:56.563Z","updated_at":"2025-04-23T20:54:25.081Z","avatar_url":"https://github.com/helm.png","language":"Go","readme":"# Chart Testing\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Go Report Card](https://goreportcard.com/badge/github.com/helm/chart-testing)](https://goreportcard.com/report/github.com/helm/chart-testing)\n![ci](https://github.com/helm/chart-testing/workflows/ci/badge.svg)\n\n`ct` is the tool for testing Helm charts.\nIt is meant to be used for linting and testing pull requests.\nIt automatically detects charts changed against the target branch.\n\n## Installation\n\n### Prerequisites\n\nIt is recommended to use the provided Docker image which can be [found on Quay](https://quay.io/repository/helmpack/chart-testing).\nIt comes with all necessary tools installed.\n\n* [Helm](http://helm.sh)\n* [Git](https://git-scm.com) (2.17.0 or later)\n* [Yamllint](https://github.com/adrienverge/yamllint)\n* [Yamale](https://github.com/23andMe/Yamale)\n* [Kubectl](https://kubernetes.io/docs/reference/kubectl/overview/)\n\n### Binary Distribution\n\nDownload the release distribution for your OS from the Releases page:\n\nhttps://github.com/helm/chart-testing/releases\n\nUnpack the `ct` binary, add it to your PATH, and you are good to go!\n\n### Docker Image\n\nA Docker image is available at `quay.io/helmpack/chart-testing` with list of\navailable tags [here](https://quay.io/repository/helmpack/chart-testing?tab=tags).\n\n### Homebrew\n\n```console\n$ brew install chart-testing\n```\n\n## Usage\n\nSee documentation for individual commands:\n\n* [ct](doc/ct.md)\n* [ct install](doc/ct_install.md)\n* [ct lint](doc/ct_lint.md)\n* [ct lint-and-install](doc/ct_lint-and-install.md)\n* [ct list-changed](doc/ct_list-changed.md)\n* [ct version](doc/ct_version.md)\n\nFor a more extensive how-to guide, please see:\n\n* [charts-repo-actions-demo](https://github.com/helm/charts-repo-actions-demo)\n\n## Configuration\n\n`ct` is a command-line application.\nAll command-line flags can also be set via environment variables or config file.\nEnvironment variables must be prefixed with `CT_`.\nUnderscores must be used instead of hyphens.\n\nCLI flags, environment variables, and a config file can be mixed.\nThe following order of precedence applies:\n\n1. CLI flags\n1. Environment variables\n1. Config file\n\nNote that linting requires config file for [yamllint](https://github.com/adrienverge/yamllint) and [yamale](https://github.com/23andMe/Yamale).\nIf not specified, these files are search in the current directory, the `.ct` directory in current directory, `$HOME/.ct`, and `/etc/ct`, in that order.\nSamples are provided in the [etc](etc) folder.\n\n### Examples\n\nThe following example show various way of configuring the same thing:\n\n#### CLI\n\n#### Remote repo\n\nWith remote repo:\n\n    ct install --remote upstream --chart-dirs stable,incubator --build-id pr-42\n\n#### Local repo\n\nIf you have a chart in current directory and ct installed on the host then you can run:\n\n    ct install --chart-dirs . --charts .\n\nWith docker it works with:\n\n    docker run -it --network host --workdir=/data --volume ~/.kube/config:/root/.kube/config:ro --volume $(pwd):/data quay.io/helmpack/chart-testing:v3.7.1 ct install --chart-dirs . --charts .\n\nNotice that `workdir` param is important and must be the same as volume mounted.\n\n\n#### Environment Variables\n\n    export CT_REMOTE=upstream\n    export CT_CHART_DIRS=stable,incubator\n    export CT_BUILD_ID\n\n    ct install\n\n#### Config File\n\n`config.yaml`:\n\n```yaml\nremote: upstream\nchart-dirs:\n  - stable\n  - incubator\nbuild-id: pr-42\n```\n\n#### Config Usage\n\n    ct install --config config.yaml\n\n\n`ct` supports any format [Viper](https://github.com/spf13/viper) can read, i. e. JSON, TOML, YAML, HCL, and Java properties files.\n\nNotice that if no config file is specified, then `ct.yaml` (or any of the supported formats) is loaded from the current directory, `$HOME/.ct`, or `/etc/ct`, in that order, if found.\n\n\n#### Using private chart repositories\n\nWhen adding chart-repos you can specify additional arguments for the `helm repo add` command using `helm-repo-extra-args` on a per-repo basis.\nYou can also specify OCI registries which will be added using the `helm registry login` command, they also support the `helm-repo-extra-args` for authentication.\nThis could for example be used to authenticate a private chart repository.\n\n`config.yaml`:\n\n```yaml\nchart-repos:\n  - incubator=https://incubator.io\n  - basic-auth=https://private.com\n  - ssl-repo=https://self-signed.ca\n  - oci-registry=oci://nice-oci-registry.pt\nhelm-repo-extra-args:\n  - ssl-repo=--ca-file ./my-ca.crt\n```\n\n    ct install --config config.yaml --helm-repo-extra-args \"basic-auth=--username user --password secret\"\n\n## Building from Source\n\n`ct` is built using Go 1.13 or higher.\n\n`build.sh` is used to build and release the tool.\nIt uses [Goreleaser](https://goreleaser.com/) under the covers.\n\nNote: on MacOS you will need `GNU Coreutils readlink`.\nYou can install it with:\n\n```console\nbrew install coreutils\n```\n\nThen add `gnubin` to your `$PATH`, with:\n\n```console\necho 'export PATH=\"$(brew --prefix coreutils)/libexec/gnubin:$PATH\"' \u003e\u003e ~/.bash_profile\nbash --login\n```\n\nTo use the build script:\n\n```console\n$ ./build.sh -h\nUsage: build.sh \u003coptions\u003e\n\nBuild ct using Goreleaser.\n\n    -h, --help      Display help\n    -d, --debug     Display verbose output and run Goreleaser with --debug\n    -r, --release   Create a release using Goreleaser. This includes the creation\n                    of a GitHub release and building and pushing the Docker image.\n                    If this flag is not specified, Goreleaser is run with --snapshot\n```\n\n## Releasing\n\n### Prepare Release\n\nBefore a release is created, versions have to be updated in the examples.\nA pull request needs to be created for this, which should be merged right before the release is cut.\nHere's a previous one for reference: https://github.com/helm/chart-testing/pull/89\n\n### Create Release\n\nThe release workflow is [dispatched from github actions](https://github.com/helm/chart-testing/actions)\nVersions must start with a lower-case `v`, e. g. `v3.7.1`.\n\n## Supported versions\n\nThe previous MAJOR version will be supported for three months after each new MAJOR release.\n\nWithin this support window, pull requests for the previous MAJOR version should be made against the previous release branch.\nFor example, if the current MAJOR version is `v2`, the pull request base branch should be `release-v1`.\n\n## Upgrading\n\nWhen upgrading from `\u003c v2.0.0` you will also need to change the usage in your scripts.\nThis is because, while the [v2.0.0](https://github.com/helm/chart-testing/releases/tag/v2.0.0) release has parity with `v1`, it was refactored from a bash library to Go so there are minor syntax differences.\nCompare [v1 usage](https://github.com/helm/chart-testing/tree/release-v1#usage) with this (`v2`) version's README [usage](#usage) section above.\n","funding_links":[],"categories":["Go","testing","蓝队工具","Other"],"sub_categories":["IAC(Infrastructure-as-Code)扫描"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelm%2Fchart-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelm%2Fchart-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelm%2Fchart-testing/lists"}