summaryrefslogtreecommitdiff
path: root/docker-run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'docker-run.sh')
-rwxr-xr-xdocker-run.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/docker-run.sh b/docker-run.sh
index b1914333..2af4c8e3 100755
--- a/docker-run.sh
+++ b/docker-run.sh
@@ -1,14 +1,14 @@
#!/bin/bash
-set -ef -o pipefail
-
-qemu="${qemu-}"
-set -u
+set -euf -o pipefail
. $(dirname $0)/jenkins-helpers.sh
convert_args_to_variables "$@"
shift "$SHIFT_CONVERTED_ARGS"
+qemu="${qemu-}"
+ssh_info="${ssh_info-false}"
+
trap "container_cleanup" EXIT
case "$qemu" in
@@ -17,4 +17,10 @@ case "$qemu" in
esac
. ./container.sh
-container_exec "$@"
+if $ssh_info; then
+ ssh_opts="--ssh_host $session_host --ssh_port $session_port"
+else
+ ssh_opts=""
+fi
+
+container_exec "$@" $ssh_opts