Merge "Add workaround for javadoc verify jobs"
authorAnil Belur <abelur@linuxfoundation.org>
Wed, 10 Jul 2019 08:50:17 +0000 (08:50 +0000)
committerGerrit Code Review <gerrit@linuxfoundation.org>
Wed, 10 Jul 2019 08:50:17 +0000 (08:50 +0000)
releasenotes/notes/add-workaround-javadocs-verify-jobs-2e482db630a6050d.yaml [new file with mode: 0644]
shell/maven-javadoc-generate.sh

diff --git a/releasenotes/notes/add-workaround-javadocs-verify-jobs-2e482db630a6050d.yaml b/releasenotes/notes/add-workaround-javadocs-verify-jobs-2e482db630a6050d.yaml
new file mode 100644 (file)
index 0000000..e7abaa2
--- /dev/null
@@ -0,0 +1,7 @@
+---
+fixes:
+  - |
+    Tarball the $JAVADOC_DIR as a workaround for javadoc verfiy jobs
+    to avoid uploading a large number of small files. Uploading a large number
+    of small files does not work well with Nexus unpack plugin which
+    fails on 504 gateway timeout.
index 99590d6..ec4743a 100644 (file)
@@ -33,3 +33,14 @@ $MVN clean install javadoc:aggregate \
     $MAVEN_OPTIONS $MAVEN_PARAMS
 
 mv "$WORKSPACE/target/site/apidocs" "$JAVADOC_DIR"
+
+# TODO: Nexus unpack plugin throws a "504 gateway timeout" for jobs archiving
+# large number of small files. Remove the workaround only we move away from
+# using Nexus as the log server.
+if [[ "$JOB_NAME" =~ "javadoc-verify" ]]; then
+    # 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
+fi