helm-conftest
helm-conftest copied to clipboard
Error: plugin "conftest" exited with error bash error not handled correctly
Summary
When making use of helm conftest, if I have required variables on my helm template but don't set them using --set helm conftest will throw a fit that gives an error, that is not actually an error when running in a pipeline, but instead silently fails or returns a success code.
Example Scenario:
A helm template exists, it has certain values in the values.yaml file that need to be passed in via an environment specific values yaml override. Provided these variables are set as blank in the values.yaml file, expecting to be overridden at deployment time, there will be an error from the helm validation side complaining that the values are not set.
Like the following snippet from pipeline:
helm conftest test ./deployment/charts/hello-world-api --policy ../../k8s-policies/policy
The helm conftest command, does not subsequently pass these errors back correctly:
Error: execution error at (hello-world-api/templates/serviceccount.yaml:9:8): specify support.contact via --set support.contact=$(supportContact)
Use --debug flag to render out invalid YAML
Error: plugin "conftest" exited with error
Is it possible to perhaps bring console error codes further up and to attach them to these stdOut messages?