Implement functionality in order to generate report directly from the artifacts folder.
This commit is contained in:
1 parent
fb0611dd5d
commit
7b6c19d8d9
4 files changed
+239
-16
No files matched your search
@@ -4,20 +4,26 @@ from cc_common.api.cli import CLIManager
|
||||
from cc_common.config import load_environment
|
||||
from persistent_storage.shared import inject_secrets
|
||||
|
||||
from .commands.generate import GenerateProperties, generate
|
||||
from .commands.generate import FolderProperties, GenerateProperties, from_folder, generate
|
||||
|
||||
|
||||
def run() -> None:
|
||||
"""Entrypoint for CLI."""
|
||||
load_environment()
|
||||
|
||||
cli = CLIManager("report_generator", "Generates the PDF report of a stored scan.")
|
||||
cli = CLIManager("report_generator", "Generates the PDF report of a scan.")
|
||||
|
||||
cli.register_command(
|
||||
"generate",
|
||||
_with_storage_secrets,
|
||||
GenerateProperties,
|
||||
help="Builds the PDF report of one scan from the artifacts it stored.",
|
||||
help="Builds the report of a scan held in the store.",
|
||||
)
|
||||
cli.register_command(
|
||||
"from-folder",
|
||||
from_folder,
|
||||
FolderProperties,
|
||||
help="Builds the report from a folder of exported artifacts, without Postgres or the bucket.",
|
||||
)
|
||||
cli.run()
|
||||
|
||||
|
||||
Reference in new issue
Block a user