X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=bootstrap-hc2vpp-verify.sh;h=70466c30a3f129de01f6778c76c33924b60ce44d;hp=603a969915ef6a8ae017c9c30e09029a983d054a;hb=5df1c3270217408b1928bcc30e5283635112055c;hpb=12a708852932c96c66a453adc24339b746971f7a diff --git a/bootstrap-hc2vpp-verify.sh b/bootstrap-hc2vpp-verify.sh index 603a969915..70466c30a3 100755 --- a/bootstrap-hc2vpp-verify.sh +++ b/bootstrap-hc2vpp-verify.sh @@ -27,13 +27,17 @@ VIRL_PKEY=priv_key VIRL_SERVER_STATUS_FILE="status" VIRL_SERVER_EXPECTED_STATUS="PRODUCTION" -ARCHIVE_ARTIFACTS=(log.html output.xml report.html honeycomb.log) - +JOB_ARCHIVE_ARTIFACTS=(log.html output.xml report.html honeycomb.log) +LOG_ARCHIVE_ARTIFACTS=(log.html output.xml report.html honeycomb.log) +JOB_ARCHIVE_DIR="archive" +LOG_ARCHIVE_DIR="$WORKSPACE/archives" +mkdir -p ${JOB_ARCHIVE_DIR} +mkdir -p ${LOG_ARCHIVE_DIR} OS=$1 if [ -f "/etc/redhat-release" ]; then DISTRO="CENTOS" - sudo yum install -y python-devel python-virtualenv + sudo yum install -y python-devel python-virtualenv openssh-clients sshpass VIRL_TOPOLOGY=$(cat ${SCRIPT_DIR}/VIRL_TOPOLOGY_CENTOS) VIRL_RELEASE=$(cat ${SCRIPT_DIR}/VIRL_RELEASE_CENTOS) else @@ -238,10 +242,13 @@ RETURN_STATUS=$? scp ${SSH_OPTIONS} \ ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/honeycomb.log . || true -# Archive artifacts -mkdir archive -for i in ${ARCHIVE_ARTIFACTS[@]}; do - cp $( readlink -f ${i} | tr '\n' ' ' ) archive/ +# Archive JOB artifacts in jenkins +for i in ${JOB_ARCHIVE_ARTIFACTS[@]}; do + cp $( readlink -f ${i} | tr '\n' ' ' ) ${JOB_ARCHIVE_DIR}/ +done +# Archive JOB artifacts to logs.fd.io +for i in ${LOG_ARCHIVE_ARTIFACTS[@]}; do + cp $( readlink -f ${i} | tr '\n' ' ' ) ${LOG_ARCHIVE_DIR}/ done exit ${RETURN_STATUS}