X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fmaven-javadoc-publish.sh;fp=shell%2Fmaven-javadoc-publish.sh;h=fa691e60f5f2d5e594b2cad85af0a428e115185a;hb=add619cadf9cdb18e57cccf4ca461701e5be7194;hp=0000000000000000000000000000000000000000;hpb=56497ce8f87463a6243bd3fb0b060fce99d58e38;p=releng%2Fglobal-jjb.git diff --git a/shell/maven-javadoc-publish.sh b/shell/maven-javadoc-publish.sh new file mode 100644 index 00000000..fa691e60 --- /dev/null +++ b/shell/maven-javadoc-publish.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# SPDX-License-Identifier: EPL-1.0 +############################################################################## +# Copyright (c) 2017 The Linux Foundation and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +############################################################################## + +# Publishes javadoc to a Maven project. + +# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound. +# Ensure we fail the job if any steps fail. +set -e -o pipefail +set +u + +JAVADOC_DIR="$WORKSPACE/archives/javadoc" + +pushd "$JAVADOC_DIR" +zip -r "$WORKSPACE/javadoc.zip" . +popd + +lftools deploy nexus-zip "$NEXUS_URL" "javadoc" "$DEPLOY_PATH" "$WORKSPACE/javadoc.zip"