summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jjb/apex/apex.yml48
-rw-r--r--jjb/functest/functest.yml69
2 files changed, 85 insertions, 32 deletions
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml
index 7a79a374d..38934786b 100644
--- a/jjb/apex/apex.yml
+++ b/jjb/apex/apex.yml
@@ -76,6 +76,7 @@
builders:
- 'apex-build'
+ - 'apex-deploy-virtual'
- 'apex-workspace-cleanup'
- job-template:
@@ -136,6 +137,7 @@
builders:
- 'apex-build'
+ - 'apex-deploy-virtual'
- 'apex-workspace-cleanup'
- job-template:
@@ -188,6 +190,8 @@
- 'apex-build'
- 'apex-upload-artifact'
- 'apex-workspace-cleanup'
+ - 'apex-deploy-virtual'
+ - 'apex-workspace-cleanup'
########################
# parameter macros
@@ -300,6 +304,50 @@
echo "ISO Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
echo "RPM Artifact is available as http://$GS_URL/$(basename $OPNFV_RPM_URL)"
+- builder:
+ name: 'apex-deploy-virtual'
+ builders:
+ - shell: |
+ #!/bin/bash
+ set -o errexit
+ set -o nounset
+ set -o pipefail
+
+ # log info to console
+ echo "Starting the Apex virtual deployment."
+ echo "--------------------------------------------------------"
+ echo
+
+ # check if we got the file
+ if [[ -f opnfv.properties ]]; then
+ # source the file so we get OPNFV vars
+ source opnfv.properties
+ RPM_INSTALL_PATH=build_output/$(basename $OPNFV_RPM_URL)
+ else
+ # get the latest.properties file in order to get info regarding latest artifact
+ curl -s -o $WORKSPACE/opnfv.properties http://$GS_URL/latest.properties
+ [[ -f opnfv.properties ]] || exit 1
+
+ # source the file so we get OPNFV vars
+ source opnfv.properties
+ RPM_INSTALL_PATH=$RPM_URL
+ fi
+
+ # update / install the new rpm
+ if rpm -q opnfv-apex; then
+ sudo yum update -y $RPM_INSTALL_PATH;
+ else
+ sudo yum install -y $RPM_INSTALL_PATH;
+ fi
+
+ # cleanup virtual machines before we start
+ sudo opnfv-clean
+ # initiate virtual deployment
+ sudo opnfv-deploy -v
+
+ echo
+ echo "--------------------------------------------------------"
+ echo "Done!"
#######################
# trigger macros
diff --git a/jjb/functest/functest.yml b/jjb/functest/functest.yml
index efd6245e1..d80cfae3d 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,23 @@
#!/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: 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
+ 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
- builder:
@@ -559,10 +566,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 +578,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 +591,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 +605,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 +618,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