From 214cc545bc595c6c617fddfefd2e7ce35c7f88ae Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Sun, 7 Nov 2021 16:18:04 +1000 Subject: [PATCH] Fix: Print upload size with deploy nexus stage Print upload size in the logs after deploying Nexus stage repositories. This is useful while comparing the repository sizes. Change-Id: Ie8cff4ae6e026177cd43c309d4f3a36bab9c7beb Signed-off-by: Anil Belur --- lftools/deploy.py | 3 +++ .../notes/add-upload-size-deploy-nexus-4206aae1e82839a7.yaml | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 releasenotes/notes/add-upload-size-deploy-nexus-4206aae1e82839a7.yaml diff --git a/lftools/deploy.py b/lftools/deploy.py index 0a34c671..5583b46c 100755 --- a/lftools/deploy.py +++ b/lftools/deploy.py @@ -897,6 +897,9 @@ def deploy_nexus_stage(nexus_url, staging_profile_id, deploy_dir): _format_url(nexus_url), staging_repo_id ) + sz_m2repo = sum(os.path.getsize(f) for f in os.listdir(deploy_dir) if os.path.isfile(f)) + log.debug("Staging repository upload size: {} bytes".format(sz_m2repo)) + log.debug("Nexus Staging URL: {}".format(_format_url(deploy_nexus_url))) deploy_nexus(deploy_nexus_url, deploy_dir) diff --git a/releasenotes/notes/add-upload-size-deploy-nexus-4206aae1e82839a7.yaml b/releasenotes/notes/add-upload-size-deploy-nexus-4206aae1e82839a7.yaml new file mode 100644 index 00000000..fe9dad3e --- /dev/null +++ b/releasenotes/notes/add-upload-size-deploy-nexus-4206aae1e82839a7.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Print upload size while deploying Nexus stage repositories. This is useful + while comparing the repository sizes being uploaded or released. -- 2.16.6