From: Naga Sugguna Date: Fri, 20 Sep 2019 15:40:40 +0000 (+0000) Subject: send_logs script X-Git-Tag: 2.0.0~35^2 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=a00d141897926db1e5fce850eb4fc284d2f47687;p=validation.git send_logs script Change-Id: I44d00dff3b066b21b9a0dca34deeda67254db1ed Signed-off-by: Naga Sugguna --- diff --git a/utils/send_logs.sh b/utils/send_logs.sh new file mode 100644 index 0000000..5a26da5 --- /dev/null +++ b/utils/send_logs.sh @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. # +# # +# You may obtain a copy of the License at # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +############################################################################## + +# This has dependecy on ~/.netrc, this perticular file tested on ATT labs. +#$ cat ~/.netrc +#machine nexus.akraino.org login password + + +set -e -u +echo "==> send_logs.sh" + +# Deploying logs to LFNexus log server ## +# BUILD_NUMBER and JOB_NAME should be set by Jenkins + +NEXUS_URL=https://nexus.akraino.org +SILO=att-blu-val +JENKINS_HOSTNAME=http://192.168.62.220/ +BUILD_URL="${JENKINS_HOSTNAME}/job/${JOB_NAME}/${BUILD_NUMBER}/" +#NEXUS_PATH="${SILO}/job/${JOB_NAME}/${BUILD_NUMBER}" +NEXUS_PATH="${SILO}/bluval_results/${BLUEPRINT}/${VERSION}/${TIMESTAMP}" + +#mv /opt/akraino/validation/results /root/jenkins/workspace/validation/ +zip -r results.zip results +echo "executing lftools deploy nexus-zip $NEXUS_URL logs $NEXUS_PATH results.zip" +lftools deploy nexus-zip $NEXUS_URL logs $NEXUS_PATH results.zip +rm results.zip +sudo rm -rf results + +echo "executing lftools deploy logs $NEXUS_URL $NEXUS_PATH $BUILD_URL" +lftools deploy logs $NEXUS_URL $NEXUS_PATH $BUILD_URL +