From b0006c608ef081b3877115e64c8ee1d7726cd23a Mon Sep 17 00:00:00 2001 From: Dave Wallace Date: Fri, 9 Jul 2021 21:58:29 -0400 Subject: Fix docker image builder vpp-ext-deps package copy to /root/Downloads. Signed-off-by: Dave Wallace Change-Id: Ifdc95193bbf6fe4866b5abfeea33a425fa8c2e9f --- docker/scripts/dbld_vpp_install_packages.sh | 37 +++++++++++++++++++---------- 1 file changed, 24 insertions(+), 13 deletions(-) (limited to 'docker/scripts') diff --git a/docker/scripts/dbld_vpp_install_packages.sh b/docker/scripts/dbld_vpp_install_packages.sh index e0d1f27f7..707096b45 100755 --- a/docker/scripts/dbld_vpp_install_packages.sh +++ b/docker/scripts/dbld_vpp_install_packages.sh @@ -39,11 +39,8 @@ for branch in ${VPP_BRANCHES[$OS_NAME]} ; do make_vpp "install-dep" "$branch" make_vpp "centos-pyyaml" "$branch" # VPP Makefile tests for centos versions if [ "$OS_ID" = "ubuntu" ] ; then - # TODO: fix VPP stable/2005 bug in sphinx-make.sh - # which fails on 'yum install python3-venv' - # that does not exist. # 'Make docs jobs are only run on ubuntu executors - # so only run for ubuntu build executors until fixed. + # so only run for ubuntu build executors. make_vpp "docs-venv" "$branch" elif [ "$OS_NAME" = "debian-9" ] ; then apt_override_cmake_install_with_pip3_version @@ -51,16 +48,30 @@ for branch in ${VPP_BRANCHES[$OS_NAME]} ; do # Download, build, and cache external deps packages make_vpp "install-ext-deps" "$branch" - set +e vpp_ext_dir="$DOCKER_VPP_DIR/build/external" - [ -d "$vpp_ext_dir/downloads" ] \ - && rsync -ac "$vpp_ext_dir/downloads/." "$DOCKER_DOWNLOADS_DIR" - [ -n "$(ls $vpp_ext_dir/*.deb)" ] \ - && rsync -ac "$vpp_ext_dir/*.deb" "$DOCKER_DOWNLOADS_DIR" - [ -n "$(ls $vpp_ext_dir/*.rpm)" ] \ - && rsync -ac "$vpp_ext_dir/*.rpm" "$DOCKER_DOWNLOADS_DIR" - set -e - + rsync -ac $vpp_ext_dir/downloads/. $DOCKER_DOWNLOADS_DIR || true + if which apt >/dev/null ; then + vpp_ext_deps_pkg=$vpp_ext_dir/$(dpkg -l vpp-ext-deps 2>/dev/null | mawk '/vpp-ext-deps/{print $2"_"$3"_"$4".deb"}') + elif which dnf >/dev/null ; then + inst_vpp_ext_deps="$(dnf list vpp-ext-deps 2>/dev/null | grep vpp-ext-deps)" + vpp_ext_deps_ver="$(echo $inst_vpp_ext_deps | mawk '{print $2}')" + vpp_ext_deps_arch="$(echo $inst_vpp_ext_deps | mawk '{print $1}'| cut -d'.' -f2)" + vpp_ext_deps_pkg="$vpp_ext_dir/vpp-ext-deps-${vpp_ext_deps_ver}.${vpp_ext_deps_arch}.rpm" + elif which yum >/dev/null ; then + inst_vpp_ext_deps="$(yum list vpp-ext-deps 2>/dev/null | grep vpp-ext-deps)" + vpp_ext_deps_ver="$(echo $inst_vpp_ext_deps | mawk '{print $2}')" + vpp_ext_deps_arch="$(echo $inst_vpp_ext_deps | mawk '{print $1}' | cut -d'.' -f2)" + vpp_ext_deps_pkg="$vpp_ext_dir/vpp-ext-deps-${vpp_ext_deps_ver}.${vpp_ext_deps_arch}.rpm" + else + echo "ERROR: Package Manager not installed!" + exit 1 + fi + if [ -f "$vpp_ext_deps_pkg" ] ; then + cp -f $vpp_ext_deps_pkg $DOCKER_DOWNLOADS_DIR + else + echo "ERROR: Missing VPP external deps package: '$vpp_ext_deps_pkg'" + exit 1 + fi # Install/cache python packages if [ "$OS_ID" = "ubuntu" ] ; then make_vpp_test "test-dep" "$branch" -- cgit 1.2.3-korg