Fix: Print upload size with deploy nexus stage 37/70037/2
authorAnil Belur <abelur@linuxfoundation.org>
Sun, 7 Nov 2021 06:18:04 +0000 (16:18 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Tue, 19 Apr 2022 23:38:32 +0000 (09:38 +1000)
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 <abelur@linuxfoundation.org>
lftools/deploy.py
releasenotes/notes/add-upload-size-deploy-nexus-4206aae1e82839a7.yaml [new file with mode: 0644]

index 0a34c67..5583b46 100755 (executable)
@@ -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 (file)
index 0000000..fe9dad3
--- /dev/null
@@ -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.