2 # basic build script example
5 ##container server node detection
6 grep search /etc/resolv.conf || true
8 OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
9 OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
12 echo OS_VERSION_ID: $OS_VERSION_ID
15 if ! [ -z ${REPO_NAME} ]; then
16 echo "INSTALLING VPP-DPKG-DEV from apt/yum repo"
17 REPO_URL="https://packagecloud.io/fdio/${STREAM}"
18 echo "REPO_URL: ${REPO_URL}"
19 # Setup by installing vpp-dev and vpp-lib
20 if [ "$OS_ID" == "ubuntu" ]; then
21 if [ -f /etc/apt/sources.list.d/99fd.io.list ];then
22 echo "Deleting: /etc/apt/sources.list.d/99fd.io.list"
23 sudo rm /etc/apt/sources.list.d/99fd.io.list
25 curl -s https://packagecloud.io/install/repositories/fdio/${STREAM}/script.deb.sh | sudo bash
26 elif [ "$OS_ID" == "centos" ]; then
27 if [ -f /etc/yum.repos.d/fdio-master.repo ]; then
28 echo "Deleting: /etc/yum.repos.d/fdio-master.repo"
29 sudo rm /etc/yum.repos.d/fdio-master.repo
31 curl -s https://packagecloud.io/install/repositories/fdio/${STREAM}/script.rpm.sh | sudo bash
38 echo "Building using \"make build-root/build.sh\""
39 [ "x${DRYRUN}" == "xTrue" ] || make UNATTENDED=yes install-dep
40 [ "x${DRYRUN}" == "xTrue" ] || make UNATTENDED=yes install-dep-extra
41 [ "x${DRYRUN}" == "xTrue" ] || make UNATTENDED=yes install-vpp
42 [ "x${DRYRUN}" == "xTrue" ] || make UNATTENDED=yes build-package
44 echo "*******************************************************************"
45 echo "* SWEETCOMB BUILD SUCCESSFULLY COMPLETED"
46 echo "*******************************************************************"