blob: 45142b006e58e97a0b1c34ee547df3e4d4b31051 [file] [log] [blame]
Gary Wu73202cf2017-10-23 15:15:52 -07001#!/bin/bash
2
Gary Wucd182072017-10-24 08:06:17 -07003SSH_KEY=~/.ssh/onap_key
4
Gary Wu73202cf2017-10-23 15:15:52 -07005if [ -z "$WORKSPACE" ]; then
6 export WORKSPACE=`git rev-parse --show-toplevel`
7fi
8
Gary Wu17cd9cb2017-10-23 15:18:39 -07009source $WORKSPACE/test/ete/scripts/install_openstack_cli.sh
10
Gary Wu73202cf2017-10-23 15:15:52 -070011cd $WORKSPACE/test/ete/scripts
12
13ROBOT_IP=$(./get-floating-ip.sh onap-robot)
14echo "ROBOT_IP=${ROBOT_IP}"
15
Gary Wucd182072017-10-24 08:06:17 -070016ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "OS_PASSWORD_INPUT=$OS_PASSWORD_INPUT bash -s" < ./remote/run-robot.sh
17LOG_DIR=$(ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "ls -1t /opt/eteshare/logs | head -1")
18rsync -e "ssh -i ${SSH_KEY}" -avPz root@${ROBOT_IP}:/opt/eteshare/logs/${LOG_DIR}/ $WORKSPACE/archives/