Fix the log file name of LTP tests
[validation.git] / utils / send_logs.sh
1 ##############################################################################
2 # Copyright (c) 2019 AT&T Intellectual Property.                             #
3 #                                                                            #
4 # Licensed under the Apache License, Version 2.0 (the "License"); you may    #
5 # not use this file except in compliance with the License.                   #
6 #                                                                            #
7 # You may obtain a copy of the License at                                    #
8 #       http://www.apache.org/licenses/LICENSE-2.0                           #
9 #                                                                            #
10 # Unless required by applicable law or agreed to in writing, software        #
11 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT  #
12 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.           #
13 # See the License for the specific language governing permissions and        #
14 # limitations under the License.                                             #
15 ##############################################################################
16
17 # This has dependecy on ~/.netrc, this perticular file tested on ATT labs.
18 #$ cat ~/.netrc
19 #machine nexus.akraino.org login <username> password <password>
20
21
22 set -e -u
23 echo "==> send_logs.sh"
24
25 # Deploying logs to LFNexus log server ##
26 # BUILD_NUMBER and JOB_NAME should be set by Jenkins
27
28 NEXUS_URL=https://nexus.akraino.org
29 SILO=att-blu-val
30 JENKINS_HOSTNAME=http://192.168.62.220/
31 BUILD_URL="${JENKINS_HOSTNAME}/job/${JOB_NAME}/${BUILD_NUMBER}/"
32 #NEXUS_PATH="${SILO}/job/${JOB_NAME}/${BUILD_NUMBER}"
33 NEXUS_PATH="${SILO}/bluval_results/${BLUEPRINT}/${VERSION}/${TIMESTAMP}"
34
35 #mv /opt/akraino/validation/results /root/jenkins/workspace/validation/
36 zip -r results.zip results
37 echo "executing lftools deploy nexus-zip $NEXUS_URL logs $NEXUS_PATH results.zip"
38 lftools deploy nexus-zip $NEXUS_URL logs $NEXUS_PATH results.zip
39 rm results.zip
40 sudo rm -rf results
41
42 echo "executing lftools deploy logs $NEXUS_URL $NEXUS_PATH $BUILD_URL"
43 lftools deploy logs $NEXUS_URL $NEXUS_PATH $BUILD_URL
44