From ba512241066ec16ecc8b91583ea98847cff09874 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 12 Oct 2012 12:52:08 +0200 Subject: [PATCH] fail early if not REQUEST_ID is given --- liveboot2db.py | 1 + liveboot_build.sh | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/liveboot2db.py b/liveboot2db.py index cc5e93e..936b94b 100755 --- a/liveboot2db.py +++ b/liveboot2db.py @@ -7,6 +7,7 @@ from db_add import * if __name__ == '__main__': + print len(sys.argv) if len(sys.argv) != 5 and len(sys.argv) !=6: # if the build was just started: print("usage: %s $job_name $build_number $liveboot_request_id $start_time") diff --git a/liveboot_build.sh b/liveboot_build.sh index 24307ce..ba5f47c 100755 --- a/liveboot_build.sh +++ b/liveboot_build.sh @@ -7,7 +7,10 @@ set -e #set -x export -SCRIPTSDIR=$(dirname $0) +if [ "$REQUEST_ID" = "" ] ; then + echo "REQUEST_ID must not be empty!" + exit 1 +fi # # Define default settings @@ -28,6 +31,7 @@ RSYNC_DST4="liveboot@10.252.1.1/liveboot/" # dc1+2 (mgmt1) RSYNC_DST5="liveboot@10.1.1.1/liveboot/" +SCRIPTSDIR=$(dirname $0) BUILD_SCRIPT=$(mktemp) cat > $BUILD_SCRIPT <<-EOF cd /srv/build -- 2.39.5