From: Anil Belur Date: Sun, 7 Nov 2021 06:18:04 +0000 (+1000) Subject: Fix: Print upload size with deploy nexus stage X-Git-Tag: v0.36.2~2^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F37%2F70037%2F2;p=releng%2Flftools.git 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 --- 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.