1
0
mirror of https://github.com/helm/chart-testing.git synced 2026-02-05 09:45:14 +01:00
Files
chart-testing/doc/ct_lint.md
Reinhard Nägele d69c43e71b Add list-changed command (#98)
Allows to identify chart changes before actually running
lint or install commands. This can be useful in the following
cases:

* In a CI setup where kind clusters are spun up on the fly,
  this makes it possible to decide whether a cluster is necessary
  at all. A PR may only contain changes that are not relevant
  to any charts.
* By knowing upfront which charts have changed, it is
  possible to load a per-chart CI configuration which would
  allows us to determine the number of nodes needed in a kind
  cluster. For most charts, one node is enough, but in certain
  scenarios, especially for StatefulSets, we may want to test
  with pod anti-affinity where replicas have to be spread across
  multiple nodes.

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
2019-01-31 17:17:25 +01:00

3.8 KiB

ct lint

Lint and validate a chart

Synopsis

Run 'helm lint', version checking, YAML schema validation on 'Chart.yaml', YAML linting on 'Chart.yaml' and 'values.yaml', and maintainer validation on

  • changed charts (default)
  • specific charts (--charts)
  • all charts (--all)

in given chart directories.

Charts may have multiple custom values files matching the glob pattern '*-values.yaml' in a directory named 'ci' in the root of the chart's directory. The chart is linted for each of these files. If no custom values file is present, the chart is linted with defaults.

ct lint [flags]

Options

      --all                            Process all charts except those explicitly excluded.
                                       Disables changed charts detection and version increment checking
      --chart-dirs strings             Directories containing Helm charts. May be specified multiple times
                                       or separate values with commas (default [charts])
      --chart-repos strings            Additional chart repositories for dependency resolutions.
                                       Repositories should be formatted as 'name=url' (ex: local=http://127.0.0.1:8879/charts).
                                       May be specified multiple times or separate values with commas
      --chart-yaml-schema string       The schema for chart.yml validation. If not specified, 'chart_schema.yaml'
                                       is searched in the current directory, '$HOME/.ct', and '/etc/ct', in
                                       that order.
      --charts strings                 Specific charts to test. Disables changed charts detection and
                                       version increment checking. May be specified multiple times
                                       or separate values with commas
      --check-version-increment        Activates a check for chart version increments (default: true) (default true)
      --config string                  Config file
      --debug                          Print CLI calls of external tools to stdout (Note: depending on helm-extra-args
                                       passed, this may reveal sensitive data)
      --excluded-charts strings        Charts that should be skipped. May be specified multiple times
                                       or separate values with commas
      --helm-repo-extra-args strings   Additional arguments for the 'helm repo add' command to be
                                       specified on a per-repo basis with an equals sign as delimiter
                                       (e.g. 'myrepo=--username test --password secret'). May be specified
                                       multiple times or separate values with commas
  -h, --help                           help for lint
      --lint-conf string               The config file for YAML linting. If not specified, 'lintconf.yaml'
                                       is searched in the current directory, '$HOME/.ct', and '/etc/ct', in
                                       that order
      --remote string                  The name of the Git remote used to identify changed charts (default "origin")
      --target-branch string           The name of the target branch used to identify changed charts (default "master")
      --validate-chart-schema          Enable schema validation of 'Chart.yaml' using Yamale (default: true) (default true)
      --validate-maintainers           Enable validation of maintainer account names in chart.yml (default: true).
                                       Works for GitHub, GitLab, and Bitbucket (default true)
      --validate-yaml                  Enable linting of 'Chart.yaml' and values files (default: true) (default true)

SEE ALSO

  • ct - The Helm chart testing tool
Auto generated by spf13/cobra on 31-Jan-2019