helm / chart-testing-action

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

fix ct.sh invocation (wrong bash array passing) #26

Closed dennybaa closed 4 years ago

unguiculus commented 4 years ago

What makes you think this is wrong? The code works as expected. It's good practice to quote variables. Actually, shellcheck will complain if you don't. See https://github.com/koalaman/shellcheck/wiki/SC2068.

dennybaa commented 4 years ago

@unguiculus Hey, actually it's not wrong. I usually do so myself in fact. But if you try passing lint --config hello-world.yaml unfortunately it wont work since it's passed down from yaml as single string. So in fact setting options doesn't work now.

dennybaa commented 4 years ago

Have a look at this one https://github.com/dysnix/charts/runs/543495558?check_suite_focus=true

Run chart-testing (lint) with my work around (which is not really proper) but it picks the args, while charts-testing (install) using the current script does not.

Actually it's better adding something like python shlex.split("this is my\ string that --has=arguments -or=something") into the main.js. So i think the real problem - is the way it's spawned from nodejs.

unguiculus commented 4 years ago

You should configure the action as follow:

  with:
    command: install
    config: .github/conf/chart-testing.yaml
dennybaa commented 4 years ago

Oh man, I should've read the the GitHub actions docs) @unguiculus thank you!