3 # Copyright (c) 2017 Cisco and/or its affiliates.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
21 URL="https://nexus.fd.io/service/local/artifact/maven/content"
24 HC_GROUP="io.fd.hc2vpp"
25 NSH_GROUP="io.fd.nsh_sfc"
26 HC_ARTIFACTS="honeycomb"
27 NSH_ARTIFACTS="vpp-nsh-plugin"
29 if [ "${OS}" == "ubuntu1404" ]; then
30 OS="ubuntu.trusty.main"
33 VPP_ARTIFACTS="vpp vpp-dbg vpp-lib vpp-plugins"
34 DPDK_ARTIFACTS="vpp-dpdk-dkms"
35 elif [ "${OS}" == "ubuntu1604" ]; then
36 OS="ubuntu.xenial.main"
39 VPP_ARTIFACTS="vpp vpp-dbg vpp-lib vpp-plugins"
40 DPDK_ARTIFACTS="vpp-dpdk-dkms"
41 elif [ "${OS}" == "centos7" ]; then
45 VPP_ARTIFACTS="vpp vpp-debuginfo vpp-lib vpp-plugins"
49 REPO="fd.io.${STREAM}.${OS}"
51 # download latest honeycomb, vpp-dpdk and nsh packages
52 for ART in ${HC_ARTIFACTS}; do
53 for PAC in ${PACKAGE}; do
54 curl "${URL}?r=${REPO}&g=${HC_GROUP}&a=${ART}&p=${PAC}&v=${VER}&c=${CLASS}" -O -J || exit
58 for ART in ${DPDK_ARTIFACTS}; do
59 for PAC in ${PACKAGE}; do
60 curl "${URL}?r=${REPO}&g=${GROUP}&a=${ART}&p=${PAC}&v=${VER}&c=${CLASS}" -O -J || exit
64 for ART in ${NSH_ARTIFACTS}; do
65 for PAC in ${PACKAGE}; do
66 curl "${URL}?r=${REPO}&g=${NSH_GROUP}&a=${ART}&p=${PAC}&v=${VER}&c=${CLASS}" -O -J || exit
70 # determine VPP dependency
71 # use latest if honeycomb package does not depend on single VPP version, e.g. stable branches since HC2VPP-285
73 if [ "${OS}" == "centos7" ]; then
74 HC_VPP_VER=`rpm -qpR honeycomb*.rpm | grep -oP 'vpp = \K.+'`
75 if [ "${HC_VPP_VER}" != "" ]; then
76 VER=${HC_VPP_VER}.x86_64
79 HC_VPP_VER=`dpkg -I honeycomb*.deb | grep -oP 'vpp \(= \K[^\)]+'`
80 if [ "${HC_VPP_VER}" != "" ]; then
81 VER=${HC_VPP_VER}_amd64
85 # download VPP packages
86 for ART in ${VPP_ARTIFACTS}; do
87 for PAC in ${PACKAGE}; do
88 curl "${URL}?r=${REPO}&g=${GROUP}&a=${ART}&p=${PAC}&v=${VER}&c=${CLASS}" -O -J || exit
92 # verify downloaded package
93 if [ "${OS}" == "centos7" ]; then
99 for FILE in ${FILES}; do
100 echo " "${FILE} >> ${FILE}.md5
102 for MD5FILE in *.md5; do
103 md5sum -c ${MD5FILE} || exit