2 # @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
3 ##############################################################################
4 # Copyright (c) 2017 The Linux Foundation and others.
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
12 set -x # Trace commands for this script to make debugging easier.
14 LOGS_SERVER="${LOGS_SERVER:-None}"
16 if [ "${LOGS_SERVER}" == 'None' ]
18 set +x # Disable trace since we no longer need it
20 echo "WARNING: Logging server not set"
22 NEXUS_URL="${NEXUS_URL:-$NEXUSPROXY}"
23 NEXUS_PATH="${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}"
24 BUILD_URL="${BUILD_URL}"
26 lftools deploy archives "$NEXUS_URL" "$NEXUS_PATH" "$WORKSPACE"
27 lftools deploy logs "$NEXUS_URL" "$NEXUS_PATH" "$BUILD_URL"
29 set +x # Disable trace since we no longer need it.
31 echo "Build logs: <a href=\"$LOGS_SERVER/$NEXUS_PATH\">$LOGS_SERVER/$NEXUS_PATH</a>"