From 7f875ac7f7820c3272d225f21d883bb13a4264b1 Mon Sep 17 00:00:00 2001 From: David Vossel Date: Mon, 4 Mar 2019 16:48:31 -0500 Subject: [PATCH] TTY is needed for docker pull and docker tag to synchronize with the build 'docker pull' behaves differently without a tty. Signed-off-by: David Vossel --- cluster/ephemeral-provider-common.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cluster/ephemeral-provider-common.sh b/cluster/ephemeral-provider-common.sh index 34606e4a126b..96083d64a9f8 100644 --- a/cluster/ephemeral-provider-common.sh +++ b/cluster/ephemeral-provider-common.sh @@ -2,7 +2,9 @@ set -e -_cli="docker run --privileged --net=host --rm ${USE_TTY} -v /var/run/docker.sock:/var/run/docker.sock kubevirtci/gocli@sha256:4a4565eb4487be95f464cb942590bbaa980a5b56acb32d955f7a9f81f4ba843c" +_cli_container="kubevirtci/gocli@sha256:4a4565eb4487be95f464cb942590bbaa980a5b56acb32d955f7a9f81f4ba843c" +_cli_with_tty="docker run --privileged --net=host --rm -t -v /var/run/docker.sock:/var/run/docker.sock ${_cli_container}" +_cli="docker run --privileged --net=host --rm ${USE_TTY} -v /var/run/docker.sock:/var/run/docker.sock ${_cli_container}" function _main_ip() { echo 127.0.0.1 @@ -55,9 +57,9 @@ function build() { container_alt_alias="${container_alt_alias} ${manifest_docker_prefix}/${name}:${docker_tag} ${manifest_docker_prefix}/${name}:${docker_tag_alt}" done for i in $(seq 1 ${KUBEVIRT_NUM_NODES}); do - ${_cli} ssh --prefix $provider_prefix "node$(printf "%02d" ${i})" "echo \"${container}\" | xargs \-\-max-args=1 sudo docker pull" - ${_cli} ssh --prefix $provider_prefix "node$(printf "%02d" ${i})" "echo \"${container_alias}\" | xargs \-\-max-args=2 sudo docker tag" - ${_cli} ssh --prefix $provider_prefix "node$(printf "%02d" ${i})" "echo \"${container_alt_alias}\" | xargs \-\-max-args=2 sudo docker tag" + ${_cli_with_tty} ssh --prefix $provider_prefix "node$(printf "%02d" ${i})" "echo \"${container}\" | xargs \-\-max-args=1 sudo docker pull" + ${_cli_with_tty} ssh --prefix $provider_prefix "node$(printf "%02d" ${i})" "echo \"${container_alias}\" | xargs \-\-max-args=2 sudo docker tag" + ${_cli_with_tty} ssh --prefix $provider_prefix "node$(printf "%02d" ${i})" "echo \"${container_alt_alias}\" | xargs \-\-max-args=2 sudo docker tag" done }