From: Zack Cerza Date: Mon, 6 Feb 2023 20:45:39 +0000 (-0700) Subject: install-deps.sh: Fail when downloading apt repos X-Git-Tag: v18.1.0~412^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=349a92bdb71b8da54a7204e9876d3fa66f47681b;p=ceph.git install-deps.sh: Fail when downloading apt repos More specifically, if we get e.g. a 504 while attempting to download a .list file, fail the build and log the status code. Signed-off-by: Zack Cerza --- diff --git a/install-deps.sh b/install-deps.sh index 3762b3de0356..4eb757f6b7d7 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -134,7 +134,8 @@ function install_pkg_on_ubuntu { fi if test -n "$missing_pkgs"; then local shaman_url="https://shaman.ceph.com/api/repos/${project}/master/${sha1}/ubuntu/${codename}/repo" - $SUDO curl --silent --location $shaman_url --output /etc/apt/sources.list.d/$project.list + in_jenkins && echo -n "CI_DEBUG: Downloading $shaman_url ... " + $SUDO curl --silent --fail --write-out "%{http_code}" --location $shaman_url --output /etc/apt/sources.list.d/$project.list $SUDO env DEBIAN_FRONTEND=noninteractive apt-get update -y -o Acquire::Languages=none -o Acquire::Translation=none || true $SUDO env DEBIAN_FRONTEND=noninteractive apt-get install --allow-unauthenticated -y $missing_pkgs fi