summaryrefslogtreecommitdiffstats
path: root/jjb/functest/functest.yml
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2015-10-27 14:19:35 +0100
committerjose.lausuch <jose.lausuch@ericsson.com>2015-10-27 15:58:22 +0100
commit8f8881e609c8ce7481afc743e8cd8943d772014d (patch)
tree33e9eba5fd5655b8fd3640fee08bd940ea58acbc /jjb/functest/functest.yml
parenteef426c5bf2c42673eb7dead6e374c7c428b007e (diff)
Adapt Functest Jenkins Job to the new automation scripts
Before start.sh was used. Now there are 2 scripts instead. See: https://gerrit.opnfv.org/gerrit/#/c/2685/ FUNCTEST-85 Change-Id: Ib04e3b176ed312033a784a1460a9ec16ccd06a46 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'jjb/functest/functest.yml')
-rw-r--r--jjb/functest/functest.yml61
1 files changed, 29 insertions, 32 deletions
diff --git a/jjb/functest/functest.yml b/jjb/functest/functest.yml
index efd6245e1..caa55ea8f 100644
--- a/jjb/functest/functest.yml
+++ b/jjb/functest/functest.yml
@@ -226,6 +226,7 @@
artifactNumToKeep: -1
builders:
+ - 'set-functest-env'
- 'functest-all'
- 'functest-store-results'
- 'functest-cleanup'
@@ -270,6 +271,7 @@
artifactNumToKeep: -1
builders:
+ - 'set-functest-env'
- 'functest-all'
- 'functest-store-results'
- 'functest-cleanup'
@@ -524,18 +526,10 @@
#!/bin/bash
set +e
- # Remove any docker containers leftovers
- docker ps | grep opnfv/functest | awk '{print $1}' | xargs docker stop &>/dev/null
- docker ps -a | grep opnfv/functest | awk '{print $1}' | xargs docker rm &>/dev/null
- docker images | grep opnfv/functest | awk '{print $3}' | xargs docker rmi &>/dev/null
-
- # Pull and store fresh image from Dockerhub
- docker pull opnfv/functest
-
- # Run Docker and Functest tests
- cmd="${FUNCTEST_REPO_DIR}/docker/start.sh"
- docker run -t -e "INSTALLER_TYPE=${INSTALLER_TYPE}" \
- -e "INSTALLER_IP=${INSTALLER_IP}" opnfv/functest $cmd
+ echo "Functest: running all the tests"
+ cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh"
+ container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
+ docker exec $container_id $cmd
- builder:
@@ -545,10 +539,15 @@
#!/bin/bash
set +e
- echo "Functest: spawn Docker and run Functest suite"
- cmd="${FUNCTEST_REPO_DIR}/docker/start.sh"
- docker run -t -e "INSTALLER_TYPE=${INSTALLER_TYPE}" \
- -e "INSTALLER_IP=${INSTALLER_IP}" opnfv/functest $cmd
+ echo "Functest: spawn 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 &
+ container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
+ docker start $container_id
+ cmd="${FUNCTEST_REPO_DIR}/docker/prepare_env.sh"
+ docker exec $container_id $cmd
- builder:
@@ -559,10 +558,9 @@
set +e
echo "Functest: run vPing"
- cmd="python ${FUNCTEST_REPO_DIR}/testcases/vPing/CI/libraries/vPing.py \
- --debug ${FUNCTEST_REPO_DIR}/ -r"
- docker run -t -e "INSTALLER_TYPE=${INSTALLER_TYPE}" \
- -e "INSTALLER_IP=${INSTALLER_IP}" opnfv/functest $cmd
+ cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test vping"
+ container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
+ docker exec $container_id $cmd
- builder:
name: functest-odl
@@ -572,9 +570,9 @@
set +e
echo "Functest: run ODL suite"
- cmd="${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI/start_tests.sh"
- docker run -t -e "INSTALLER_TYPE=${INSTALLER_TYPE}" \
- -e "INSTALLER_IP=${INSTALLER_IP}" opnfv/functest $cmd
+ cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test odl"
+ container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
+ docker exec $container_id $cmd
- builder:
name: functest-tempest-smoke
@@ -585,9 +583,9 @@
# tempest
echo "Functest: run Tempest suite"
- cmd="rally verify start smoke; rally verify list;"
- docker run -t -e "INSTALLER_TYPE=${INSTALLER_TYPE}" \
- -e "INSTALLER_IP=${INSTALLER_IP}" opnfv/functest $cmd
+ cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test tempest"
+ container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
+ docker exec $container_id $cmd
@@ -599,10 +597,9 @@
set +e
echo "Functest: run Functest Rally Bench suites"
- cmd="python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/run_rally.py \
- --debug ${FUNCTEST_REPO_DIR}/ all"
- docker run -t -e "INSTALLER_TYPE=${INSTALLER_TYPE}" \
- -e "INSTALLER_IP=${INSTALLER_IP}" opnfv/functest $cmd
+ cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test rally"
+ container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
+ docker exec $container_id $cmd
- builder:
@@ -613,8 +610,8 @@
set +e
cmd="python ${FUNCTEST_REPO_DIR}/testcases/vIMS/CI/vIMS.py \
--debug ${FUNCTEST_REPO_DIR}/"
- docker run -t -e "INSTALLER_TYPE=${INSTALLER_TYPE}" \
- -e "INSTALLER_IP=${INSTALLER_IP}" opnfv/functest $cmd
+ container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
+ docker exec $container_id $cmd