-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
There's currently no 'output to file' option for this tool, meaning you need to write stdout into files if you want, for example, the junit tests to be discoverable by other tooling.
Unfortunately this can sometimes mean that warnings output from Helm can end up in the file if you're simply redirecting stdout:
coalesce.go:298: warning: cannot overwrite table with non table for tolerateSpot (map[])
<testsuites name="kubeconform" time="0.127582172" tests="8" failures="0" disabled="0" errors="0">
<testsuite name="stdin" id="1" tests="8" failures="0" errors="0" disabled="0" skipped="0">
<testcase name="release-name" classname="ServiceAccount@v1" time="0"></testcase>
<testcase name="release-name" classname="Service@v1" time="0"></testcase>
<testcase name="release-name" classname="PodDisruptionBudget@policy/v1" time="0"></testcase>
<testcase name="release-name" classname="Service@v1" time="0"></testcase>
<testcase name="release-name" classname="Ingress@networking.k8s.io/v1" time="0"></testcase>
<testcase name="release-name" classname="HorizontalPodAutoscaler@autoscaling/v2" time="0"></testcase>
<testcase name="release-name" classname="ServiceMonitor@monitoring.coreos.com/v1" time="0"></testcase>
<testcase name="release-name" classname="Deployment@apps/v1" time="0"></testcase>
</testsuite>
</testsuites>A couple of potential fixes for this:
- Output warnings to stderr, so it can be appropriately redirected
- Add an option to save the junit results to a file directly
My current workaround is just a grep filter:
helm kubeconform --output="junit" . | { grep -v ".go" || true; } | tee "junit.xml"Still a great little tool though, thanks for this!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels