From cad4dd63f2a3dae512c712b6e19d61257c8127fb Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Tue, 27 Oct 2015 16:21:34 +0100 Subject: Adapt Functest Jenkins Job to the new automation scripts Bugfix tty console JIRA: FUNCTEST-85 Change-Id: I3a150e8d86cfeb5512ed575cbe6115974de962f8 Signed-off-by: jose.lausuch --- jjb/functest/functest.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/jjb/functest/functest.yml b/jjb/functest/functest.yml index caa55ea8f..d80cfae3d 100644 --- a/jjb/functest/functest.yml +++ b/jjb/functest/functest.yml @@ -539,12 +539,20 @@ #!/bin/bash set +e - echo "Functest: spawn Docker and prepare environment" + echo "Functest: Start Docker and prepare environment" envs="INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP}" docker ps -a | grep opnfv/functest | awk '{print $1}' | xargs docker rm -f &>/dev/null docker pull opnfv/functest - docker run -ti -e $envs opnfv/functest /bin/bash & + echo "Functest: Running docker run command: docker run -i -e $envs opnfv/functest /bin/bash &" + docker run -i -e $envs opnfv/functest /bin/bash & + docker ps -a container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1) + echo "Container ID=${container_id}" + if [ -z ${container_id} ]; then + echo "Cannot find opnfv/functest container ID. Please check if it is existing." + docker ps -a + exit 1 + fi docker start $container_id cmd="${FUNCTEST_REPO_DIR}/docker/prepare_env.sh" docker exec $container_id $cmd -- cgit 1.2.3-korg