Skip to content

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

Open
@anton-dealmeida

Description

@anton-dealmeida

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions