helm / chart-testing-action

A GitHub Action to lint and test Helm charts
https://github.com/helm/chart-testing
Apache License 2.0
245 stars 71 forks source link

fix: remove CT_CONFIG_DIR #150

Closed znd4 closed 1 month ago

znd4 commented 3 months ago

This fixes #108

If there are other things in ${cache_dir}/etc/ct.yaml, can we set them as individual environment variables?

It's a feel bad that this action doesn't work with the default in-repo ct.yaml locations

jhollowayjc commented 3 months ago

Hopefully useful: When I try this I get:

ct lint --target-branch main
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/[3](https://github.com/TheJumpCloud/charts/actions/runs/9550292830/job/26321903569#step:5:3).12.4/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.[4](https://github.com/TheJumpCloud/charts/actions/runs/9550292830/job/26321903569#step:5:4)/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.4/x[6](https://github.com/TheJumpCloud/charts/actions/runs/9550292830/job/26321903569#step:5:6)4
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.4/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.4/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.4/x64/lib
    VIRTUAL_ENV: /opt/hostedtoolcache/ct/3.11.0/amd64/venv
Error: failed loading configuration: 'chart_schema.yaml' neither specified nor found in default locations
Linting charts...
failed loading configuration: 'chart_schema.yaml' neither specified nor found in default locations
znd4 commented 1 month ago

Hmm I see that the other files are necessary. Maybe chart-testing should have an alternative config field for just yamllint / yamale? either way, this PR obvs isn't gonna work