Skip to content

Commit

Permalink
main: Add command line arg for consuming reports
Browse files Browse the repository at this point in the history
This is work towards #946

This commit introduces the command line argument --with-context or
-ctx to input a list of reports that can provide previous context
for container builds. This argument is meant to be used with
--live to input reports from previous runs.

Signed-off-by: Nisha K <[email protected]>
  • Loading branch information
Nisha K committed Jun 2, 2021
1 parent 0c46292 commit 1e167fa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tern/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,17 @@ def main():
help="Generate a report for the current state "
"of the filesystem. This is useful when "
"running Tern in a new namespace or VM.")
parser_report.add_argument('-ctx', '--with-context', metavar='FILES',
nargs='+',
help="""Generate a report taking into account
reports generated by previous runs against
the same filesystem. This option is meant to
be used with the --live option like this:
tern report --live <path/to/filesystem> -ctx
report1 report2 report3... -f json -o report4.
The order of the reports must correspond to the
order in which they were generated. Supported
input report formats are: json""")

# subparser for dockerfile lock
parser_lock = subparsers.add_parser('lock',
Expand Down

0 comments on commit 1e167fa

Please sign in to comment.