Add lf ci-management jjb jobs
[releng/global-jjb.git] / shell / logs-deploy.sh
1 #!/bin/bash
2 # @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
3 ##############################################################################
4 # Copyright (c) 2017 The Linux Foundation and others.
5 #
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
12 set -x  # Trace commands for this script to make debugging easier.
13
14 LOGS_SERVER="${LOGS_SERVER:-WARNING: Logging Server Not Set.}"
15 NEXUS_URL="${NEXUS_URL:-$NEXUSPROXY}"
16 NEXUS_PATH="${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}"
17 BUILD_URL="${BUILD_URL}"
18
19 lftools deploy archives "$NEXUS_URL" "$NEXUS_PATH" "$WORKSPACE"
20 lftools deploy logs "$NEXUS_URL" "$NEXUS_PATH" "$BUILD_URL"
21
22 set +x  # Disable trace since we no longer need it.
23
24 echo "Build logs: <a href=\"$LOGS_SERVER/$NEXUS_PATH\">$LOGS_SERVER/$NEXUS_PATH</a>"