aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap-vpp-verify-semiweekly.sh
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2017-02-15 12:23:51 +0100
committerMatej Klotton <mklotton@cisco.com>2017-02-20 09:38:09 +0000
commita70972124d9774c60e6b1d2d8c43662f71ff35ae (patch)
tree366f5092adffe39f26110d6f86fa1e7b5d6efce3 /bootstrap-vpp-verify-semiweekly.sh
parent1ea7d6957d6e9eff1c28ab5a49ceca6bd50cb5b9 (diff)
Implement support of Centos7 for semiweekly job
- adapt bootstrap-vpp-verify-semiweekly.sh script to be able to run with Centos7 distro - adapt script to download vpp pkgs to be able to download Centos7 release packages - changes are needed for Jenkins job csit-vpp-verify-{branch}-centos7-semiweekly Change-Id: Iddb5d2867b83615eeaaa1f08359138c31a3e5607 Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'bootstrap-vpp-verify-semiweekly.sh')
-rw-r--r--bootstrap-vpp-verify-semiweekly.sh51
1 files changed, 38 insertions, 13 deletions
diff --git a/bootstrap-vpp-verify-semiweekly.sh b/bootstrap-vpp-verify-semiweekly.sh
index 7f41dbf434..2897292eb2 100644
--- a/bootstrap-vpp-verify-semiweekly.sh
+++ b/bootstrap-vpp-verify-semiweekly.sh
@@ -32,25 +32,43 @@ ARCHIVE_ARTIFACTS=(log.html output.xml report.html)
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export PYTHONPATH=${SCRIPT_DIR}
+if [ -f "/etc/redhat-release" ]; then
+ DISTRO="CENTOS"
+else
+ DISTRO="UBUNTU"
+fi
# 1st step: Download and prepare VPP packages
# Temporarily download VPP packages from nexus.fd.io
-rm -f *.deb
if [ "${#}" -ne "0" ]; then
arr=(${@})
echo ${arr[0]}
else
+ case "$DISTRO" in
+ CENTOS )
+ rm -f *.rpm
+ ;;
+ UBUNTU )
+ rm -f *.deb
+ esac
# Download the latest VPP build .deb install packages
echo Downloading VPP packages...
bash ${SCRIPT_DIR}/resources/tools/download_install_vpp_pkgs.sh --skip-install
fi
-VPP_DEBS=(*.deb)
-echo ${VPP_DEBS[@]}
-
-VPP_VER=$(echo ${VPP_DEBS#vpp-})
-VPP_VER=$(echo ${VPP_VER%-deb.deb})
+# Take vpp package and get the vpp version
+case "$DISTRO" in
+ CENTOS )
+ VPP_PKGS="$( readlink -f *.rpm | tr '\n' ' ' )"
+ VPP_VER="$( expr match $(ls *.rpm | head -n 1) 'vpp-\(.*\).rpm' )"
+ echo ${VPP_PKGS[@]}
+ ;;
+ UBUNTU )
+ VPP_PKGS="$( readlink -f *.deb | tr '\n' ' ' )"
+ VPP_VER="$( expr match $(ls *.deb | head -n 1) 'vpp-\(.*\)-deb.deb' )"
+ echo ${VPP_PKGS[@]}
+esac
set +x
echo "****************************************************************************************************************************************"
@@ -87,8 +105,15 @@ VIRL_PKEY=priv_key
VIRL_SERVER_STATUS_FILE="status"
VIRL_SERVER_EXPECTED_STATUS="PRODUCTION"
-VIRL_TOPOLOGY=double-ring-nested.xenial
-VIRL_RELEASE=csit-ubuntu-16.04.1_2016-12-19_1.6
+case "$DISTRO" in
+ CENTOS )
+ VIRL_TOPOLOGY=double-ring-nested.centos7
+ VIRL_RELEASE=csit-centos-7.3-1611_2017-02-14_1.3
+ ;;
+ UBUNTU )
+ VIRL_TOPOLOGY=double-ring-nested.xenial
+ VIRL_RELEASE=csit-ubuntu-16.04.1_2016-12-19_1.6
+esac
SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error"
@@ -166,14 +191,14 @@ done
VIRL_DIR_LOC="/tmp"
-VPP_DEBS_VIRL=(${VPP_DEBS[@]})
+VPP_PKGS_VIRL=(${VPP_PKGS[@]})
# Prepend directory location at remote host to deb file list
-for index in "${!VPP_DEBS_VIRL[@]}"; do
- VPP_DEBS_VIRL[${index}]=${VIRL_DIR_LOC}/${VPP_DEBS_VIRL[${index}]}
+for index in "${!VPP_PKGS_VIRL[@]}"; do
+ VPP_PKGS_VIRL[${index}]=${VIRL_DIR_LOC}/${VPP_PKGS_VIRL[${index}]}
done
-echo "Updated file names: " ${VPP_DEBS_VIRL[@]}
+echo "Updated file names: " ${VPP_PKGS_VIRL[@]}
cat ${VIRL_PKEY}
# Copy the files to VIRL host
@@ -197,7 +222,7 @@ function stop_virl_simulation {
VIRL_SID=$(ssh ${SSH_OPTIONS} \
${VIRL_USERNAME}@${VIRL_SERVER} \
- "start-testcase -c ${VIRL_TOPOLOGY} -r ${VIRL_RELEASE} ${VPP_DEBS_VIRL[@]}")
+ "start-testcase -c ${VIRL_TOPOLOGY} -r ${VIRL_RELEASE} ${VPP_PKGS_VIRL[@]}")
retval=$?
if [ ${retval} -ne "0" ]; then
echo "VIRL simulation start failed"