diff options
author | Jan Gelety <jgelety@cisco.com> | 2017-02-15 12:23:51 +0100 |
---|---|---|
committer | Matej Klotton <mklotton@cisco.com> | 2017-02-20 09:38:09 +0000 |
commit | a70972124d9774c60e6b1d2d8c43662f71ff35ae (patch) | |
tree | 366f5092adffe39f26110d6f86fa1e7b5d6efce3 /resources/tools | |
parent | 1ea7d6957d6e9eff1c28ab5a49ceca6bd50cb5b9 (diff) |
Implement support of Centos7 for semiweekly job
- adapt bootstrap-vpp-verify-semiweekly.sh script to be able to
run with Centos7 distro
- adapt script to download vpp pkgs to be able to download
Centos7 release packages
- changes are needed for Jenkins job
csit-vpp-verify-{branch}-centos7-semiweekly
Change-Id: Iddb5d2867b83615eeaaa1f08359138c31a3e5607
Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/tools')
-rwxr-xr-x | resources/tools/download_install_vpp_pkgs.sh | 58 |
1 files changed, 41 insertions, 17 deletions
diff --git a/resources/tools/download_install_vpp_pkgs.sh b/resources/tools/download_install_vpp_pkgs.sh index 67c8362b7e..547f44493e 100755 --- a/resources/tools/download_install_vpp_pkgs.sh +++ b/resources/tools/download_install_vpp_pkgs.sh @@ -15,25 +15,49 @@ set -ex -trap 'rm -f *.deb.md5; exit' EXIT -trap 'rm -f *.deb.md5;rm -f *.deb; exit' ERR - URL="https://nexus.fd.io/service/local/artifact/maven/content" VER="RELEASE" +GROUP="io.fd.vpp" + +if [ -f "/etc/redhat-release" ]; then + trap 'rm -f *.rpm.md5; exit' EXIT + trap 'rm -f *.rpm.md5;rm -f *.rpm; exit' ERR + + VPP_REPO_URL_PATH="./VPP_REPO_URL_CENTOS" + if [ -e "$VPP_REPO_URL_PATH" ]; then + VPP_REPO_URL=$(cat $VPP_REPO_URL_PATH) + REPO=$(echo ${VPP_REPO_URL#https://nexus.fd.io/content/repositories/}) + REPO=$(echo ${REPO%/io/fd/vpp/}) + else + REPO='fd.io.master.centos7' + FILES=*.rpm + MD5FILES=*.rpm.md5 + fi -VPP_REPO_URL_PATH="./VPP_REPO_URL" -if [ -e "$VPP_REPO_URL_PATH" ]; then - VPP_REPO_URL=$(cat $VPP_REPO_URL_PATH) - REPO=$(echo ${VPP_REPO_URL#https://nexus.fd.io/content/repositories/}) - REPO=$(echo ${REPO%/io/fd/vpp/}) + ARTIFACTS="vpp vpp-debuginfo vpp-devel vpp-dpdk-devel vpp-lib vpp-plugins" + PACKAGE="rpm rpm.md5" + CLASS="" + VPP_INSTALL_COMMAND="rpm -ivh *.rpm" else - REPO='fd.io.master.ubuntu.xenial.main' -fi + trap 'rm -f *.deb.md5; exit' EXIT + trap 'rm -f *.deb.md5;rm -f *.deb; exit' ERR -GROUP="io.fd.vpp" -ARTIFACTS="vpp vpp-dbg vpp-dev vpp-dpdk-dev vpp-dpdk-dkms vpp-lib vpp-plugins" -PACKAGE="deb deb.md5" -CLASS="deb" + VPP_REPO_URL_PATH="./VPP_REPO_URL_UBUNTU" + if [ -e "$VPP_REPO_URL_PATH" ]; then + VPP_REPO_URL=$(cat $VPP_REPO_URL_PATH) + REPO=$(echo ${VPP_REPO_URL#https://nexus.fd.io/content/repositories/}) + REPO=$(echo ${REPO%/io/fd/vpp/}) + else + REPO='fd.io.master.ubuntu.xenial.main' + FILES=*.deb + MD5FILES=*.deb.md5 + fi + + ARTIFACTS="vpp vpp-dbg vpp-dev vpp-dpdk-dev vpp-dpdk-dkms vpp-lib vpp-plugins" + PACKAGE="deb deb.md5" + CLASS="deb" + VPP_INSTALL_COMMAND="dpkg -i *.deb" +fi for ART in ${ARTIFACTS}; do for PAC in $PACKAGE; do @@ -41,17 +65,17 @@ for ART in ${ARTIFACTS}; do done done -for FILE in *.deb; do +for FILE in ${FILES}; do echo " "${FILE} >> ${FILE}.md5 done -for MD5FILE in *.md5; do +for MD5FILE in ${MD5FILES}; do md5sum -c ${MD5FILE} || exit done if [ "$1" != "--skip-install" ]; then echo Installing VPP - sudo dpkg -i *.deb + sudo ${VPP_INSTALL_COMMAND} else echo VPP Installation skipped fi |