]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
install-deps.sh: Fail when downloading apt repos 50011/head
authorZack Cerza <zack@redhat.com>
Mon, 6 Feb 2023 20:45:39 +0000 (13:45 -0700)
committerZack Cerza <zack@redhat.com>
Mon, 6 Feb 2023 20:50:46 +0000 (13:50 -0700)
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 <zack@redhat.com>
install-deps.sh

index 3762b3de03565828c988c8c3ac96cfccc3ad7a08..4eb757f6b7d73083fd7a5623e5701faca6684f30 100755 (executable)
@@ -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