From: jose.lausuch Date: Wed, 28 Oct 2015 09:39:00 +0000 (+0100) Subject: Adapt Functest Jenkins Job to the new automation scripts X-Git-Tag: test-tag~236 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=bb8d9eacc7476a0f00bc0bde6d19d73021812134;p=releng.git Adapt Functest Jenkins Job to the new automation scripts Bugfix: added sleep 5 to allow the container to be created before starting it. JIRA: FUNCTEST-85 Change-Id: I8d282d1aa3a18bb6cc9471a1416a8bb7de701198 Signed-off-by: jose.lausuch --- diff --git a/jjb/functest/functest.yml b/jjb/functest/functest.yml index d80cfae3d..92afa7d0f 100644 --- a/jjb/functest/functest.yml +++ b/jjb/functest/functest.yml @@ -546,16 +546,25 @@ 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 + sleep 5 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." + echo "Cannot find opnfv/functest container ID ${container_id}. Please check if it is existing." docker ps -a exit 1 fi - docker start $container_id + echo "Starting the container: docker start ${container_id}" + docker start ${container_id} + sleep 5 + docker ps + if [ $(docker ps | grep opnfv/functest | wc -l) == 0 ]; then + echo "The container opnfv/functest with ID=${container_id} has not been properly started. Exiting..." + exit 1 + fi cmd="${FUNCTEST_REPO_DIR}/docker/prepare_env.sh" - docker exec $container_id $cmd + echo "Executing command inside the docker: ${cmd}" + docker exec ${container_id} ${cmd} - builder: