From c3a1e96a689f162826720c786d6327972a99b5d7 Mon Sep 17 00:00:00 2001 From: Andrew Yourtchenko Date: Wed, 19 Jan 2022 14:16:03 +0000 Subject: Allow the optimization of preinstalling vpp-ext-deps to fail e62c4bc9708a906d2dcd504cdcca5964b232d3b3 added stricter error handling, thus creating a failure case if a packagecloud repo has been newly created and is empty. Relax the error handling, and add the comment about the motivation. Signed-off-by: Andrew Yourtchenko Change-Id: I8bfe6d69ab1a59622c60080e796f301b6b6f4ead --- jjb/scripts/setup_vpp_ext_deps.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'jjb/scripts') diff --git a/jjb/scripts/setup_vpp_ext_deps.sh b/jjb/scripts/setup_vpp_ext_deps.sh index 1ca982d45..5ace223cf 100755 --- a/jjb/scripts/setup_vpp_ext_deps.sh +++ b/jjb/scripts/setup_vpp_ext_deps.sh @@ -15,7 +15,18 @@ echo "---> jjb/scripts/setup_vpp_ext_deps.sh" -set -e -o pipefail +# Normally we would have the settings in any bash script stricter: +# set -e -o pipefail +# +# But there is a corner case scenario that triggers an error, +# namely when a new packagecloud repo is created, it is completely +# empty. Then the installation fails. However, since this +# script is an optimization, it is okay for it to fail without failing +# the entire job. +# +# Therefore, we do not use the "-e" here. + +set -o pipefail OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') -- cgit 1.2.3-korg