X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fmaven-javadoc-generate.sh;h=ec4743a742df4c367ce1b8ed13f25f603a8c03f9;hb=e50da79e348b4302edf4f2cc2ed4842830f9cc54;hp=891f60bcf7329cbfbd189eaca0effc677fd41426;hpb=8808c71bc8632fc6e3553cd674e8c605ad5af436;p=releng%2Fglobal-jjb.git diff --git a/shell/maven-javadoc-generate.sh b/shell/maven-javadoc-generate.sh index 891f60bc..ec4743a7 100644 --- a/shell/maven-javadoc-generate.sh +++ b/shell/maven-javadoc-generate.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -l # SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2017 The Linux Foundation and others. @@ -8,7 +8,7 @@ # which accompanies this distribution, and is available at # http://www.eclipse.org/legal/epl-v10.html ############################################################################## - +echo "---> maven-javadoc-generate.sh" # Generates javadoc in a Maven project. # DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound. @@ -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