mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
ci: helper: Introduce --quiet for the refresh command
Offer an option to silence all output to stdout coming out of the dockerfiles/varsfiles generating code. Signed-off-by: Erik Skultety <eskultet@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
cbd7124f49
commit
013b5a085a
12
ci/helper
12
ci/helper
@ -116,6 +116,12 @@ class Parser:
|
|||||||
parents=[lcitoolparser],
|
parents=[lcitoolparser],
|
||||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
||||||
)
|
)
|
||||||
|
refreshparser.add_argument(
|
||||||
|
"--quiet",
|
||||||
|
action="store_true",
|
||||||
|
default=False,
|
||||||
|
help="refresh data silently"
|
||||||
|
)
|
||||||
refreshparser.set_defaults(func=Application.action_refresh)
|
refreshparser.set_defaults(func=Application.action_refresh)
|
||||||
|
|
||||||
def parse(self):
|
def parse(self):
|
||||||
@ -173,7 +179,8 @@ class Application:
|
|||||||
outfile = f"ci-{host}-cross-{cross}.Dockerfile"
|
outfile = f"ci-{host}-cross-{cross}.Dockerfile"
|
||||||
|
|
||||||
outpath = outdir.joinpath(outfile)
|
outpath = outdir.joinpath(outfile)
|
||||||
print(outpath)
|
if not self.args.quiet:
|
||||||
|
print(outpath)
|
||||||
|
|
||||||
output = self.lcitool_run(args)
|
output = self.lcitool_run(args)
|
||||||
with open(outpath, "w") as f:
|
with open(outpath, "w") as f:
|
||||||
@ -185,7 +192,8 @@ class Application:
|
|||||||
outfile = f"{host}.vars"
|
outfile = f"{host}.vars"
|
||||||
|
|
||||||
outpath = outdir.joinpath(outfile)
|
outpath = outdir.joinpath(outfile)
|
||||||
print(outpath)
|
if not self.args.quiet:
|
||||||
|
print(outpath)
|
||||||
|
|
||||||
output = self.lcitool_run(args)
|
output = self.lcitool_run(args)
|
||||||
with open(outpath, "w") as f:
|
with open(outpath, "w") as f:
|
||||||
|
Loading…
Reference in New Issue
Block a user