Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: plugin "conftest" exited with error bash error not handled correctly #14

Open
anton-dealmeida opened this issue Nov 25, 2021 · 0 comments

Comments

@anton-dealmeida
Copy link

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:
image

helm conftest test ./deployment/charts/hello-world-api --policy ../../k8s-policies/policy

The helm conftest command, does not subsequently pass these errors back correctly:
image

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant