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"
23 # TODO(CSIT-994): reenable NSH
24 # NSH_GROUP="io.fd.nsh_sfc"
25 # NSH_ARTIFACTS="vpp-nsh-plugin"
26 VPP_ARTIFACTS="vpp vpp-lib vpp-plugins vpp-api-java"
28 if [ "${OS}" == "ubuntu1604" ]; then
29 OS="ubuntu.xenial.main"
32 elif [ "${OS}" == "centos7" ]; then
38 REPO="fd.io.${STREAM}.${OS}"
40 # Use vpp packages based on vpp-version file from hc2vpp project
42 if [ "${VER}" != 'RELEASE' ]; then
43 if [ "${OS}" == "centos7" ]; then
50 for ART in ${VPP_ARTIFACTS}; do
51 for PAC in ${PACKAGE}; do
52 curl "${URL}?r=${REPO}&g=${VPP_GROUP}&a=${ART}&p=${PAC}&v=${VER}&c=${CLASS}" -O -J || exit
56 # TODO(CSIT-994): reenable NSH
57 # for ART in ${NSH_ARTIFACTS}; do
58 # for PAC in ${PACKAGE}; do
59 # curl "${URL}?r=${REPO}&g=${NSH_GROUP}&a=${ART}&p=${PAC}&v=${VER}&c=${CLASS}" -O -J || exit
63 # verify downloaded packages
64 if [ "${OS}" == "centos7" ]; then
70 for FILE in ${FILES}; do
71 echo " "${FILE} >> ${FILE}.md5
73 for MD5FILE in *.md5; do
74 md5sum -c ${MD5FILE} || exit
78 # install vpp-api-java, this extracts jvpp .jar files into usr/share/java
79 if [ "${OS}" == "centos7" ]; then
80 sudo rpm --nodeps --install vpp-api-java*
82 sudo dpkg --ignore-depends=vpp --install vpp-api-java*
85 # install jvpp jars into maven repo, so that maven picks them up when building hc2vpp
86 version=`../jvpp/version`
91 for item in jvpp*.jar; do
92 # Example filename: jvpp-registry-17.01-20161206.125556-1.jar
93 # ArtifactId = jvpp-registry
95 basefile=$(basename -s .jar "$item")
96 artifactId=$(echo "$basefile" | cut -d '-' -f 1-2)
97 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