summaryrefslogtreecommitdiffstats
path: root/jjb/scripts
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2022-01-19 14:16:03 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2022-01-19 14:16:03 +0000
commitc3a1e96a689f162826720c786d6327972a99b5d7 (patch)
tree18ccee51bc6cc568457bd11e31bc70884f49477d /jjb/scripts
parentf6a1a39b809fa2c5f4e96ad30aad09f973614318 (diff)
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 <ayourtch@gmail.com> Change-Id: I8bfe6d69ab1a59622c60080e796f301b6b6f4ead
Diffstat (limited to 'jjb/scripts')
-rwxr-xr-xjjb/scripts/setup_vpp_ext_deps.sh13
1 files changed, 12 insertions, 1 deletions
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')