HC Test: update honeycomb package download scripts 74/6174/7
authorselias <samelias@cisco.com>
Wed, 12 Apr 2017 16:40:11 +0000 (18:40 +0200)
committerJan Gelety <jgelety@cisco.com>
Thu, 13 Apr 2017 14:57:10 +0000 (14:57 +0000)
 - add "_amd64" to version parameter for .deb packages
 - install only vpp-api-java on maven build slave

Change-Id: Ie61974c3c2806d1d3e0281bd0b5149f1b0d1443d
Signed-off-by: selias <samelias@cisco.com>
resources/tools/download_hc_build_pkgs.sh
resources/tools/download_hc_pkgs.sh

index f653b5b..6683499 100755 (executable)
@@ -15,8 +15,6 @@
 
 set -ex
 
-trap 'rm -f *.deb.md5; exit' EXIT
-trap 'rm -f *.deb.md5;rm -f *.deb; exit' ERR
 STREAM=$1
 OS=$2
 
@@ -25,21 +23,23 @@ URL="https://nexus.fd.io/service/local/artifact/maven/content"
 VER="RELEASE"
 VPP_GROUP="io.fd.vpp"
 NSH_GROUP="io.fd.nsh_sfc"
-VPP_ARTIFACTS="vpp vpp-dbg vpp-dev vpp-dpdk-dev vpp-dpdk-dkms vpp-lib vpp-plugins vpp-api-java"
 NSH_ARTIFACTS="vpp-nsh-plugin"
 
 if [ "${OS}" == "ubuntu1404" ]; then
     OS="ubuntu.trusty.main"
     PACKAGE="deb deb.md5"
     CLASS="deb"
+    VPP_ARTIFACTS="vpp vpp-dbg vpp-dev vpp-dpdk-dkms vpp-lib vpp-plugins vpp-api-java"
 elif [ "${OS}" == "ubuntu1604" ]; then
     OS="ubuntu.xenial.main"
     PACKAGE="deb deb.md5"
     CLASS="deb"
+    VPP_ARTIFACTS="vpp vpp-dbg vpp-dev vpp-dpdk-dkms vpp-lib vpp-plugins vpp-api-java"
 elif [ "${OS}" == "centos7" ]; then
     OS="centos7"
     PACKAGE="rpm rpm.md5"
-    CLASS="rpm"
+    CLASS=""
+    VPP_ARTIFACTS="vpp vpp-debuginfo vpp-devel vpp-lib vpp-plugins vpp-api-java"
 fi
 
 REPO="fd.io.${STREAM}.${OS}"
@@ -56,19 +56,30 @@ for ART in ${NSH_ARTIFACTS}; do
     done
 done
 
-for FILE in *.deb; do
+# verify downloaded packages
+if [ "${OS}" == "centos7" ]; then
+    FILES=*.rpm
+else
+    FILES=*.deb
+fi
+
+for FILE in ${FILES}; do
     echo " "${FILE} >> ${FILE}.md5
 done
-
 for MD5FILE in *.md5; do
     md5sum -c ${MD5FILE} || exit
+    rm ${MD5FILE}
 done
 
-# installing vpp-api-java places jvpp jars into /usr/share/java
-sudo dpkg -i *.deb
+# install vpp-api-java, this extracts jvpp .jar files into usr/share/java
+if [ "${OS}" == "centos7" ]; then
+    sudo rpm --nodeps --install vpp-api-java*
+else
+    sudo dpkg --ignore-depends=vpp --install vpp-api-java*
+fi
 
 # install jvpp jars into maven repo, so that maven picks them up when building hc2vpp
-version=`./jvpp-version`
+version=`../jvpp-version`
 
 current_dir=`pwd`
 cd /usr/share/java
@@ -82,4 +93,4 @@ for item in jvpp*.jar; do
     mvn install:install-file -Dfile=${item} -DgroupId=io.fd.vpp -DartifactId=${artifactId} -Dversion=${version} -Dpackaging=jar -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
 done
 
-cd current_dir
\ No newline at end of file
+cd ${current_dir}
\ No newline at end of file
index 3c7190e..23e0be4 100755 (executable)
@@ -31,19 +31,19 @@ if [ "${OS}" == "ubuntu1404" ]; then
     PACKAGE="deb deb.md5"
     CLASS="deb"
     VPP_ARTIFACTS="vpp vpp-dbg vpp-dev vpp-lib vpp-plugins vpp-api-java"
-    DPDK_ARTIFACTS="vpp-dpdk-dkms vpp-dpdk-dev"
+    DPDK_ARTIFACTS="vpp-dpdk-dkms"
 elif [ "${OS}" == "ubuntu1604" ]; then
     OS="ubuntu.xenial.main"
     PACKAGE="deb deb.md5"
     CLASS="deb"
     VPP_ARTIFACTS="vpp vpp-dbg vpp-dev vpp-lib vpp-plugins vpp-api-java"
-    DPDK_ARTIFACTS="vpp-dpdk-dkms vpp-dpdk-dev"
+    DPDK_ARTIFACTS="vpp-dpdk-dkms"
 elif [ "${OS}" == "centos7" ]; then
     OS="centos7"
     PACKAGE="rpm rpm.md5"
     CLASS=""
     VPP_ARTIFACTS="vpp vpp-debuginfo vpp-devel vpp-lib vpp-plugins vpp-api-java"
-    DPDK_ARTIFACTS="vpp-dpdk-devel"
+    DPDK_ARTIFACTS=""
 fi
 
 REPO="fd.io.${STREAM}.${OS}"
@@ -73,6 +73,7 @@ if [ "${OS}" == "centos7" ]; then
     VER=${VER}.x86_64
 else
     VER=`dpkg -I honeycomb*.deb | grep -oP 'vpp \(= \K[^\)]+'`
+    VER=${VER}_amd64
 fi
 
 # download VPP packages

©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.