Compress and upload Javadoc for publish jobs 21/13921/3
authorAnil Belur <abelur@linuxfoundation.org>
Tue, 11 Dec 2018 11:47:47 +0000 (21:47 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Wed, 12 Dec 2018 07:44:43 +0000 (17:44 +1000)
Javadoc publish job always successfully publishes to the "javadoc"
repo, therefore dont maintain another copy of this on the logs
server. Also Javadocs contain ~15K small files which potentially
requires additional CPU cycles for pruning on the logs server.

Issue: RELENG-1215
Change-Id: I1b107a1c65db4b70096d5735c741fb32f09daedd
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
shell/maven-javadoc-publish.sh

index e395a5e..9a5a3a4 100644 (file)
@@ -23,3 +23,9 @@ zip -r "$WORKSPACE/javadoc.zip" .
 popd
 
 lftools deploy nexus-zip "$NEXUS_URL" "javadoc" "$DEPLOY_PATH" "$WORKSPACE/javadoc.zip"
+
+# Tarball the javadoc dir and rm the directory to avoid re-upload into logs
+pushd "$JAVADOC_DIR"
+tar cvJf "$WORKSPACE/archives/javadoc.tar.xz" .
+rm -rf "$JAVADOC_DIR"
+popd