From: jose.lausuch Date: Tue, 27 Oct 2015 15:21:34 +0000 (+0100) Subject: Adapt Functest Jenkins Job to the new automation scripts X-Git-Tag: test-tag~241 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F39%2F2839%2F1;p=releng.git Adapt Functest Jenkins Job to the new automation scripts Bugfix tty console JIRA: FUNCTEST-85 Change-Id: I3a150e8d86cfeb5512ed575cbe6115974de962f8 Signed-off-by: jose.lausuch --- 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