diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2015-10-28 10:39:00 +0100 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2015-10-28 10:45:05 +0100 |
commit | bb8d9eacc7476a0f00bc0bde6d19d73021812134 (patch) | |
tree | 19fe84d3825ed68599086857e45d1811e5d20589 | |
parent | 27bdaee261678df799ef6a6231d80341e9bc13c6 (diff) |
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 <jose.lausuch@ericsson.com>
-rw-r--r-- | jjb/functest/functest.yml | 15 |
1 files changed, 12 insertions, 3 deletions
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: |