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 HC_ARTIFACTS="honeycomb"
26 # TODO(CSIT-994): reenable NSH
27 # NSH_GROUP="io.fd.nsh_sfc"
28 # NSH_ARTIFACTS="vpp-nsh-plugin"
29 VPP_ARTIFACTS="vpp vpp-lib vpp-plugins"
31 if [ "${OS}" == "ubuntu1604" ]; then
32 OS="ubuntu.xenial.main"
35 elif [ "${OS}" == "centos7" ]; then
41 REPO="fd.io.${STREAM}.${OS}"
43 # download latest honeycomb and nsh packages
44 for ART in ${HC_ARTIFACTS}; do
45 for PAC in ${PACKAGE}; do
46 curl "${URL}?r=${REPO}&g=${HC_GROUP}&a=${ART}&p=${PAC}&v=${VER}&c=${CLASS}" -O -J || exit
50 # TODO(CSIT-994): reenable NSH
51 # for ART in ${NSH_ARTIFACTS}; do
52 # for PAC in ${PACKAGE}; do
53 # curl "${URL}?r=${REPO}&g=${NSH_GROUP}&a=${ART}&p=${PAC}&v=${VER}&c=${CLASS}" -O -J || exit
57 # determine VPP dependency
58 # use latest if honeycomb package does not depend on single VPP version, e.g. stable branches since HC2VPP-285
60 if [ "${OS}" == "centos7" ]; then
61 HC_VPP_VER=`rpm -qpR honeycomb*.rpm | grep -oP 'vpp = \K.+'`
62 if [ "${HC_VPP_VER}" != "" ]; then
63 VER=${HC_VPP_VER}.x86_64
66 HC_VPP_VER=`dpkg -I honeycomb*.deb | grep -oP 'vpp \(= \K[^\)]+'`
67 if [ "${HC_VPP_VER}" != "" ]; then
68 VER=${HC_VPP_VER}_amd64
72 # download VPP packages
73 for ART in ${VPP_ARTIFACTS}; do
74 for PAC in ${PACKAGE}; do
75 curl "${URL}?r=${REPO}&g=${GROUP}&a=${ART}&p=${PAC}&v=${VER}&c=${CLASS}" -O -J || exit
79 # verify downloaded package
80 if [ "${OS}" == "centos7" ]; then
86 for FILE in ${FILES}; do
87 echo " "${FILE} >> ${FILE}.md5
89 for MD5FILE in *.md5; do
90 md5sum -c ${MD5FILE} || exit