Compress and upload the jjb-verify XML files 28/13828/3
authorAnil Belur <abelur@linuxfoundation.org>
Wed, 5 Dec 2018 09:19:33 +0000 (19:19 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Wed, 5 Dec 2018 11:30:39 +0000 (21:30 +1000)
The present jjb-verify job that calls lftools maven
deploy archives for releng/builder which takes about ~8 mins to
complete uploading the archives. This is because the job generates
around ~2.3K XML files (small files) which is uploaded to Nexus.
This is possibly because the Nexus Unpack plugin in the Nexus
end unpacking the zip file we upload takes longer.

It's best to compress this into a single file and upload
to Nexus, potentially minimizing the Nexus logs from
bloating up since we have been seeing higher IOPs
and load managing these files in the backend cron jobs.

Compressing the job files before hand shaves off around
6-8 mins from the upload time, therefore reducing the
job time overall significantly.

Tested the change here:
https://jenkins.opendaylight.org/releng/job/builder-jjb-verify/4325

Change-Id: Ifb3ea6e61d28b234c79088ca128294a037ec511f
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
releasenotes/notes/jjv-verify-compress-xml-files-71ae17abdfc79c2f.yaml [new file with mode: 0644]
shell/jjb-verify-job.sh

diff --git a/releasenotes/notes/jjv-verify-compress-xml-files-71ae17abdfc79c2f.yaml b/releasenotes/notes/jjv-verify-compress-xml-files-71ae17abdfc79c2f.yaml
new file mode 100644 (file)
index 0000000..f28ea8b
--- /dev/null
@@ -0,0 +1,9 @@
+---
+fixes:
+  - |
+    Compress and upload all jjb-verify XML files to Nexus, to ease out the IOPs
+    on cron jobs that manage the logs on Nexus and optimize job performace by
+    ~8 mins. This is because the job generates around ~2.3K XML files (small
+    files) which is uploaded to Nexus in every run of jjb-verify. Doing this
+    is faster as compared to the Nexus Unpack plugin in the Nexus end unpacking
+    the zip file we upload takes longer.
index f38685f..add3937 100644 (file)
@@ -28,3 +28,8 @@ do
     fi
 done
 popd
+
+if [ ! -z "$(ls -A archives/job-configs)" ]; then
+    tar cvzf archives/job-configs.tar.gz archives/job-configs
+    rm -rf archives/job-configs
+fi