Fix of bootstrap.sh for vpp-csit-verify-virl job 29/629/1
authorJan Gelety <jgelety@cisco.com>
Tue, 29 Mar 2016 10:25:16 +0000 (12:25 +0200)
committerJan Gelety <jgelety@cisco.com>
Tue, 29 Mar 2016 10:25:16 +0000 (12:25 +0200)
- moved rm -f *.deb to else statement to avoid
  deletion of deb packages when boostrap.sh is
  called from include-raw-vpp-csit-functional.sh

Change-Id: I4a224a1fc332d50a27347e77dbeacbfbc98677c9
Signed-off-by: Jan Gelety <jgelety@cisco.com>
bootstrap.sh

index efd5f34..99458eb 100755 (executable)
@@ -14,9 +14,6 @@
 
 set -x
 
-echo | sudo tee -a /etc/hostname
-echo "127.0.0.1 `cat /etc/hostname` " | sudo tee -a /etc/hosts
-
 cat /etc/hostname
 cat /etc/hosts
 
@@ -24,31 +21,12 @@ export DEBIAN_FRONTEND=noninteractive
 sudo apt-get -y update
 sudo apt-get -y install libpython2.7-dev python-virtualenv
 
-#VIRL_VMS="10.30.51.53,10.30.51.51,10.30.51.52"
-#IFS=',' read -ra ADDR <<< "${VIRL_VMS}"
-#
-
 function ssh_do() {
     echo
     echo "### "  ssh $@
     ssh -i priv_key -o StrictHostKeyChecking=no $@
 }
 
-#for addr in "${ADDR[@]}"; do
-#    echo
-#    echo ${addr}
-#    echo
-#
-#    ssh_do cisco@${addr} hostname || true
-#    ssh_do cisco@${addr} "ifconfig -a" || true
-#    ssh_do cisco@${addr} "lspci -Dnn | grep 0200" || true
-#    ssh_do cisco@${addr} "free -m" || true
-#    ssh_do cisco@${addr} "cat /proc/meminfo" || true
-#    ssh_do cisco@${addr} "dpkg -l vpp\*" || true
-#    ssh_do cisco@${addr} "lshw -c network" || true
-#    ssh_do cisco@${addr} "sudo -S sh -c 'echo exec show  hardware | vpp_api_test '"
-#done
-
 VIRL_SERVER=10.30.51.28
 VIRL_USERNAME=jenkins-in
 VIRL_PKEY=priv_key
@@ -87,11 +65,11 @@ chmod 600 priv_key
 
 # Temporarily download VPP packages from nexus.fd.io
 
-rm -f *.deb
 if [ "${#}" -ne "0" ]; then
     arr=(${@})
     echo ${arr[0]}
 else
+    rm -f *.deb
     wget -q "https://nexus.fd.io/service/local/repositories/fd.io.dev/content/io/fd/vpp/vpp/1.0.0-229~gb1df169_amd64/vpp-1.0.0-229~gb1df169_amd64.deb" || exit
     wget -q "https://nexus.fd.io/service/local/repositories/fd.io.dev/content/io/fd/vpp/vpp-dbg/1.0.0-229~gb1df169_amd64/vpp-dbg-1.0.0-229~gb1df169_amd64.deb" || exit
     wget -q "https://nexus.fd.io/service/local/repositories/fd.io.dev/content/io/fd/vpp/vpp-dev/1.0.0-229~gb1df169_amd64/vpp-dev-1.0.0-229~gb1df169_amd64.deb" || exit

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.