From: Ward Vandewege Date: Fri, 9 Oct 2015 17:09:20 +0000 (-0400) Subject: Make it possible to pass --debug through to the script run inside the Docker X-Git-Url: https://git.arvados.org/arvados-dev.git/commitdiff_plain/8f535386bf3cf4bb0e6a929e4a39796fae235f3f Make it possible to pass --debug through to the script run inside the Docker build containers. No issue # --- diff --git a/jenkins/run-build-packages-all-targets.sh b/jenkins/run-build-packages-all-targets.sh index ddf87c1..8c889a0 100755 --- a/jenkins/run-build-packages-all-targets.sh +++ b/jenkins/run-build-packages-all-targets.sh @@ -10,6 +10,8 @@ Options: --command Build command to execute (default: use built-in Docker image command) +--debug + Output debug information (default: false) WORKSPACE=path Path to the Arvados source tree to build packages from @@ -34,13 +36,14 @@ fi set -e PARSEDOPTS=$(getopt --name "$0" --longoptions \ - help,command: \ + help,debug,command: \ -- "" "$@") if [ $? -ne 0 ]; then exit 1 fi COMMAND= +DEBUG= eval set -- "$PARSEDOPTS" while [ $# -gt 0 ]; do @@ -50,6 +53,9 @@ while [ $# -gt 0 ]; do echo >&2 exit 1 ;; + --debug) + DEBUG=" --debug" + ;; --command) COMMAND="$2"; shift ;; @@ -64,7 +70,7 @@ while [ $# -gt 0 ]; do done if [[ "$COMMAND" != "" ]]; then - COMMAND="/usr/local/rvm/bin/rvm-exec default bash /jenkins/$COMMAND" + COMMAND="/usr/local/rvm/bin/rvm-exec default bash /jenkins/$COMMAND$DEBUG" fi FINAL_EXITCODE=0 diff --git a/jenkins/run-build-packages-one-target.sh b/jenkins/run-build-packages-one-target.sh index 5451a4e..2d8d8df 100755 --- a/jenkins/run-build-packages-one-target.sh +++ b/jenkins/run-build-packages-one-target.sh @@ -10,6 +10,8 @@ Syntax: Distribution to build packages for (default: debian7) --command Build command to execute (default: use built-in Docker image command) +--debug + Output debug information (default: false) WORKSPACE=path Path to the Arvados source tree to build packages from @@ -32,7 +34,7 @@ if ! [[ -d "$WORKSPACE" ]]; then fi PARSEDOPTS=$(getopt --name "$0" --longoptions \ - help,target:,command: \ + help,debug,target:,command: \ -- "" "$@") if [ $? -ne 0 ]; then exit 1 @@ -40,6 +42,7 @@ fi TARGET=debian7 COMMAND= +DEBUG= eval set -- "$PARSEDOPTS" while [ $# -gt 0 ]; do @@ -52,6 +55,9 @@ while [ $# -gt 0 ]; do --target) TARGET="$2"; shift ;; + --debug) + DEBUG=" --debug" + ;; --command) COMMAND="$2"; shift ;; @@ -68,7 +74,7 @@ done set -e if [[ "$COMMAND" != "" ]]; then - COMMAND="/usr/local/rvm/bin/rvm-exec default bash /jenkins/$COMMAND --target $TARGET" + COMMAND="/usr/local/rvm/bin/rvm-exec default bash /jenkins/$COMMAND --target $TARGET$DEBUG" fi FINAL_EXITCODE=0