datree icon indicating copy to clipboard operation
datree copied to clipboard

Write policy check results to local log file

Open hadar-co opened this issue 3 years ago • 0 comments

Background:

  1. Github provides an option to add a job summary within workflows for a nice stylized output. We would like to implement this within our github action.
  2. Writing policy check results to a log file will allow us to understand and debug issues more easily.

Solution: Each "datree test" invocation will write its output to a log file (in JSON format) in addition to the output displayed in the CLI. The log files will reside in an OS temp folder where they will be deleted periodically.

Our github action will read this log file to extract details of the policy check (num of failed rules, num of files scanned, etc.) and use them in the job summary.

hadar-co avatar May 29 '22 08:05 hadar-co