diff options
Diffstat (limited to 'start-container-docker.sh')
-rwxr-xr-x | start-container-docker.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/start-container-docker.sh b/start-container-docker.sh index 3892f999..ff98d563 100755 --- a/start-container-docker.sh +++ b/start-container-docker.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -o pipefail -. $(dirname $0)/jenkins-helpers.sh +. "$(dirname $0)"/jenkins-helpers.sh # Start a local docker instance with the requested arch and distro @@ -26,8 +26,8 @@ usage() { echo " prefix: prefix to prepend to output variables and functions" echo " session-host: hostname where the container will run, defaults to localhost" echo " useful if the name resolution does not work correctly" - echo " session-name: session, in case the default '$BUILD_NUMBER-$JOB_NAME' is not suitable" - echo " ssh_info: set $ssh_host and $ssh_port env variables in the container" + echo " session-name: session, in case the default '\$BUILD_NUMBER-\$JOB_NAME' is not suitable" + echo " ssh_info: set \$ssh_host and \$ssh_port env variables in the container" echo " task: type of container (build, test or bench, default=build)" echo " user: remote user to use in the container." echo " weight: container weight, reserves resources. Default=1" @@ -196,6 +196,7 @@ fi if [ x"$session_name" = x ]; then # Set the default session_name, using BUILD_NUMBER and JOB_NAME, # as set by Jenkins. + # shellcheck disable=SC2153 if [ "x$BUILD_NUMBER" != "x" -a "x$JOB_NAME" != "x" ]; then session_name="$BUILD_NUMBER-$JOB_NAME" else @@ -325,6 +326,7 @@ fi # Remove the docker instance we have just created in case something # goes wrong. CONTAINER_CLEANUP="$DOCKER rm -fv ${session_id}" +# shellcheck disable=SC2064 trap "exec 1>&3 2>&4 ; ${CONTAINER_CLEANUP}" EXIT if [ x"$newuser" != x"" ]; then |