summaryrefslogtreecommitdiff
path: root/start-container-docker.sh
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2019-07-15 12:54:32 +0200
committerDiana Picus <diana.picus@linaro.org>2019-08-29 11:07:16 +0000
commit0c66afd4aff6f1fac5554d265981a9fe058cc0db (patch)
treefa704c5bf1e0a3cb5ea46bd2eb080078279feaee /start-container-docker.sh
parente532a62eef1151d854e7a0433b1516622f05ee66 (diff)
start-container-docker.sh: More dry-run friendly
Add a few more $dryruncmd before commands that would otherwise run even in dry-run mode. Change-Id: Ia539c159ef6d4b99dfe0ae87344b3f3908e59a2e
Diffstat (limited to 'start-container-docker.sh')
-rwxr-xr-xstart-container-docker.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/start-container-docker.sh b/start-container-docker.sh
index 6e1858bb..44a7c200 100755
--- a/start-container-docker.sh
+++ b/start-container-docker.sh
@@ -213,8 +213,7 @@ image=linaro/ci-${container_arch}-tcwg-${task}-ubuntu:${distro}
# Avoid connexion sharing because of race conditions with parallel
# builds
SSH="ssh -S none"
-
-DOCKER="$SSH $session_host docker"
+DOCKER="$dryruncmd $SSH $session_host docker"
$DOCKER pull $image || ssh_error $?
SECURITY="--cap-add=SYS_PTRACE"
@@ -251,7 +250,7 @@ for bind_mount in "${bind_mounts[@]}"; do
# If a host bind-mount dir doesn't exist, then docker creates it on
# the host with root:root owner, which can't be removed by cleanup job.
dir="${bind_mount%%:*}"
- $SSH $session_host mkdir -p "$dir"
+ $dryruncmd $SSH $session_host mkdir -p "$dir"
if [ x"$docker_root" != x"" ]; then
# If inside "host" container (with proxied docker and /home from
@@ -314,7 +313,7 @@ session_port=$($DOCKER port $session_id 22 | cut -d: -f 2) || ssh_error $?
# success stdout contains only the connexion info expected by the
# caller.
ret=0
-wait_for_ssh_server ${user}$session_host $session_port || ret=$?
+$dryruncmd wait_for_ssh_server ${user}$session_host $session_port || ret=$?
if [ $ret -eq 1 ]; then
echo SSH server did not respond, exiting