From 5e5844a6ad951536605f4c5eff32b71ee2736615 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Tue, 7 Jul 2020 14:43:07 +0200 Subject: [PATCH] Add a way to disable build summary List what was built/failed/skipped is quite long and not always interesting. Add a way to disable it. Change-Id: If171102e665dba627bac30ae81deee2d3ab10595 --- kolla/common/config.py | 4 +++- kolla/image/build.py | 7 ++++--- .../notes/new-option-summary-3acc4e62a0c7ac40.yaml | 4 ++++ 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/new-option-summary-3acc4e62a0c7ac40.yaml diff --git a/kolla/common/config.py b/kolla/common/config.py index 76f2fd5772..52a8dc98d9 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -252,7 +252,9 @@ _CLI_OPTS = [ cfg.BoolOpt('quiet', short='q', default=False, help='Do not print image logs'), cfg.BoolOpt('enable-unbuildable', default=False, - help='Enable images marked as unbuildable') + help='Enable images marked as unbuildable'), + cfg.BoolOpt('summary', default=True, + help='Show summary at the end of build') ] _BASE_OPTS = [ diff --git a/kolla/image/build.py b/kolla/image/build.py index ca5a0f0cda..1ef93bf71c 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -1453,8 +1453,9 @@ def run_build(): build_queue.put(WorkerThread.tombstone) raise - results = kolla.summary() + if conf.summary: + results = kolla.summary() + if conf.format == 'json': + print(json.dumps(results)) kolla.cleanup() - if conf.format == 'json': - print(json.dumps(results)) return kolla.get_image_statuses() diff --git a/releasenotes/notes/new-option-summary-3acc4e62a0c7ac40.yaml b/releasenotes/notes/new-option-summary-3acc4e62a0c7ac40.yaml new file mode 100644 index 0000000000..bcb6fce536 --- /dev/null +++ b/releasenotes/notes/new-option-summary-3acc4e62a0c7ac40.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Added new option "--(no)summary" to allow to hide after build summary.