2 # SPDX-License-Identifier: 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 ##############################################################################
11 echo "---> logs-deploy.sh"
13 # Ensure we fail the job if any steps fail.
16 set -x # Trace commands for this script to make debugging easier.
18 ARCHIVE_ARTIFACTS="${ARCHIVE_ARTIFACTS:-}"
19 LOGS_SERVER="${LOGS_SERVER:-None}"
21 if [ "${LOGS_SERVER}" == 'None' ]
23 set +x # Disable trace since we no longer need it
25 echo "WARNING: Logging server not set"
27 NEXUS_URL="${NEXUS_URL:-$NEXUSPROXY}"
28 NEXUS_PATH="${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}"
29 BUILD_URL="${BUILD_URL}"
31 lftools deploy archives -p "$ARCHIVE_ARTIFACTS" "$NEXUS_URL" "$NEXUS_PATH" "$WORKSPACE"
32 lftools deploy logs "$NEXUS_URL" "$NEXUS_PATH" "$BUILD_URL"
34 set +x # Disable trace since we no longer need it.
36 echo "Build logs: <a href=\"$LOGS_SERVER/$NEXUS_PATH\">$LOGS_SERVER/$NEXUS_PATH</a>"