From 3cd7e017758476461fab96164720dcb56f1e55ee Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Fri, 5 Jul 2019 11:04:09 +1000 Subject: [PATCH] Add workaround for javadoc verify jobs 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. Tested the workaround with javadoc-verify job. https://logs.opendaylight.org/releng/vex-yul-odl-jenkins-1/bgpcep-maven-javadoc-verify-sodium-openjdk8/189 Issue: IT-16635 Change-Id: Ic7b0e3a56800312e3bcb888b4d35f9ccfd2d5018 Signed-off-by: Anil Belur --- .../add-workaround-javadocs-verify-jobs-2e482db630a6050d.yaml | 7 +++++++ shell/maven-javadoc-generate.sh | 11 +++++++++++ 2 files changed, 18 insertions(+) create mode 100644 releasenotes/notes/add-workaround-javadocs-verify-jobs-2e482db630a6050d.yaml 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 index 00000000..e7abaa27 --- /dev/null +++ b/releasenotes/notes/add-workaround-javadocs-verify-jobs-2e482db630a6050d.yaml @@ -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. diff --git a/shell/maven-javadoc-generate.sh b/shell/maven-javadoc-generate.sh index 99590d64..ec4743a7 100644 --- a/shell/maven-javadoc-generate.sh +++ b/shell/maven-javadoc-generate.sh @@ -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 -- 2.16.6