X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=bootstrap-hc2vpp-integration.sh;h=f2858ffbadd54a8c3711b3eb52e576d9aea0a107;hp=eec9eef400e40796c52511d1ffac498c8494906c;hb=376f6ff865564bd704eb810bbd87e4e45095b1da;hpb=5e59e02d72a8c98b1fa54a8c863349c605ef095a diff --git a/bootstrap-hc2vpp-integration.sh b/bootstrap-hc2vpp-integration.sh index eec9eef400..f2858ffbad 100755 --- a/bootstrap-hc2vpp-integration.sh +++ b/bootstrap-hc2vpp-integration.sh @@ -17,9 +17,7 @@ set -x cat /etc/hostname cat /etc/hosts -export DEBIAN_FRONTEND=noninteractive -sudo apt-get -y update -sudo apt-get -y install libpython2.7-dev python-virtualenv +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" VIRL_SERVERS=("10.30.51.28" "10.30.51.29" "10.30.51.30") VIRL_SERVER="" @@ -29,18 +27,28 @@ VIRL_PKEY=priv_key VIRL_SERVER_STATUS_FILE="status" VIRL_SERVER_EXPECTED_STATUS="PRODUCTION" +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} + STREAM=$1 OS=$2 -if [ "${OS}" == "ubuntu1404" ]; then - VIRL_TOPOLOGY=double-ring-nested.trusty - VIRL_RELEASE=csit-ubuntu-14.04.4_2016-10-07_1.3 -elif [ "${OS}" == "ubuntu1604" ]; then - VIRL_TOPOLOGY=double-ring-nested.xenial - VIRL_RELEASE=csit-ubuntu-16.04.1_2016-12-19_1.6 -elif [ "${OS}" == "centos7" ]; then - VIRL_TOPOLOGY=double-ring-nested.centos7 - VIRL_RELEASE=csit-centos-7.3-1611 +if [ -f "/etc/redhat-release" ]; then + DISTRO="CENTOS" + sudo yum install -y python-devel python-virtualenv + VIRL_TOPOLOGY=$(cat ${SCRIPT_DIR}/VIRL_TOPOLOGY_CENTOS) + VIRL_RELEASE=$(cat ${SCRIPT_DIR}/VIRL_RELEASE_CENTOS) +else + DISTRO="UBUNTU" + export DEBIAN_FRONTEND=noninteractive + sudo apt-get -y update + sudo apt-get -y install libpython2.7-dev python-virtualenv + VIRL_TOPOLOGY=$(cat ${SCRIPT_DIR}/VIRL_TOPOLOGY_UBUNTU) + VIRL_RELEASE=$(cat ${SCRIPT_DIR}/VIRL_RELEASE_UBUNTU) fi SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error" @@ -121,7 +129,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Download VPP and HC packages from the current branch echo Downloading packages... -bash ${SCRIPT_DIR}/resources/tools/download_hc_pkgs.sh ${STREAM} ${OS} +bash ${SCRIPT_DIR}/resources/tools/scripts/download_hc_pkgs.sh ${STREAM} ${OS} if [ "${OS}" == "centos7" ]; then VPP_PKGS=(*.rpm) @@ -224,13 +232,28 @@ if [ "$?" -ne "0" ]; then echo "However, the tests will start." fi +# TODO(CSIT-994): reenable NSH PYTHONPATH=`pwd` pybot -L TRACE -W 136\ -v TOPOLOGY_PATH:${SCRIPT_DIR}/topologies/enabled/topology.yaml \ - --suite "tests.func" \ - --include honeycomb_sanity \ + --suite "tests.honeycomb.func" \ + --include HC_FUNC \ + --exclude HC_NSH \ --noncritical EXPECTED_FAILING \ tests/ +RETURN_STATUS=$? + # Get Honeycomb log file from virl host scp ${SSH_OPTIONS} \ ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/honeycomb.log . || true + +# 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}