summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-02-26 15:28:18 +0100
committerpespin <pespin@sysmocom.de>2020-03-03 09:22:01 +0000
commit5855cf91cc43542e5034fba6619ca703518e0ba4 (patch)
tree5014599eac95cc9614c734c92386300de8c34918
parent54f9316fcfbc726ffb27eef275353fd6ff334797 (diff)
update-osmo-ci-slaves: Fail jenkins jobs on script failure
It's been noted that jenkins job update-osmo-ci-on-slaves succeeds even if make script called by some children function fails: """ ../make/Makefile:57: recipe for target 'docker-build' failed make: *** [docker-build] Terminated make: Leaving directory '/home/osmocom-build/osmo-ci/_docker_playground/debian-stretch-jenkins' + exit 1 Finished: SUCCESS """ Change-Id: Iab9bc49eebee0f42657ff3ab5ffaa10315446440
-rw-r--r--scripts/common.sh3
-rwxr-xr-xscripts/osmo-ci-docker-rebuild.sh1
2 files changed, 3 insertions, 1 deletions
diff --git a/scripts/common.sh b/scripts/common.sh
index 1c2dfe0..af7c354 100644
--- a/scripts/common.sh
+++ b/scripts/common.sh
@@ -153,6 +153,7 @@ docker_images_require() {
# Subshell: run docker_images_require from jenkins-common.sh, pass all arguments
(. ../jenkins-common.sh; docker_images_require "$@")
-
+ ret=$?
cd "$oldpwd"
+ return $ret
}
diff --git a/scripts/osmo-ci-docker-rebuild.sh b/scripts/osmo-ci-docker-rebuild.sh
index 943b5a0..6a1cc27 100755
--- a/scripts/osmo-ci-docker-rebuild.sh
+++ b/scripts/osmo-ci-docker-rebuild.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+set -e -x
cd "$(dirname "$0")/.."
. scripts/common.sh
docker_images_require \