summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jjb/compass4nfv/compass-ci-jobs.yml109
-rw-r--r--jjb/compass4nfv/compass-deploy.sh11
-rw-r--r--jjb/compass4nfv/compass-project-jobs.yml17
-rw-r--r--jjb/functest/functest-ci-jobs.yml127
-rwxr-xr-xjjb/functest/functest-cleanup.sh21
-rwxr-xr-xjjb/functest/functest-daily.sh12
-rwxr-xr-xjjb/functest/functest-suite.sh12
-rwxr-xr-xjjb/functest/set-functest-env.sh73
-rw-r--r--jjb/opnfv/opnfv-docker.sh4
-rw-r--r--jjb/yardstick/yardstick-ci-jobs.yml79
-rwxr-xr-xjjb/yardstick/yardstick-cleanup.sh22
-rwxr-xr-xjjb/yardstick/yardstick-daily.sh40
-rw-r--r--jjb/yardstick/yardstick-project-jobs.yml2
-rwxr-xr-xjjb/yardstick/yardstick-vtcdaily.sh6
-rw-r--r--utils/test/result_collection_api/README.md1
15 files changed, 305 insertions, 231 deletions
diff --git a/jjb/compass4nfv/compass-ci-jobs.yml b/jjb/compass4nfv/compass-ci-jobs.yml
index ce9193cb5..40f5445dd 100644
--- a/jjb/compass4nfv/compass-ci-jobs.yml
+++ b/jjb/compass4nfv/compass-ci-jobs.yml
@@ -34,7 +34,8 @@
- huawei-pod2:
os-version: 'centos7'
<<: *master
- - intel-pod8:
+# - intel-pod8:
+ - huawei-pod1:
os-version: 'trusty'
<<: *master
- huawei-virtual:
@@ -44,19 +45,19 @@
scenario:
- 'os-nosdn-nofeature-ha':
disabled: false
- auto-trigger-name: 'compass-{scenario}-{pod}-trigger'
+ auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
- 'os-odl_l2-nofeature-ha':
disabled: false
- auto-trigger-name: 'compass-{scenario}-{pod}-trigger'
+ auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
- 'os-odl_l3-nofeature-ha':
disabled: false
- auto-trigger-name: 'compass-{scenario}-{pod}-trigger'
+ auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
- 'os-onos-nofeature-ha':
disabled: false
- auto-trigger-name: 'compass-{scenario}-{pod}-trigger'
+ auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
- 'os-ocl-nofeature-ha':
disabled: false
- auto-trigger-name: 'compass-{scenario}-{pod}-trigger'
+ auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
jobs:
- 'compass-{scenario}-{pod}-daily-{stream}'
@@ -213,82 +214,126 @@
# trigger macros
########################
- trigger:
- name: 'compass-os-nosdn-nofeature-ha-huawei-pod2-trigger'
+ name: 'compass-os-nosdn-nofeature-ha-huawei-pod2-master-trigger'
triggers:
- timed: '0 3 * * *'
- trigger:
- name: 'compass-os-odl_l2-nofeature-ha-huawei-pod2-trigger'
+ name: 'compass-os-odl_l2-nofeature-ha-huawei-pod2-master-trigger'
triggers:
- timed: '0 21 * * *'
- trigger:
- name: 'compass-os-odl_l3-nofeature-ha-huawei-pod2-trigger'
+ name: 'compass-os-odl_l3-nofeature-ha-huawei-pod2-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'compass-os-onos-nofeature-ha-huawei-pod2-trigger'
+ name: 'compass-os-onos-nofeature-ha-huawei-pod2-master-trigger'
triggers:
- timed: '0 15 * * *'
- trigger:
- name: 'compass-os-ocl-nofeature-ha-huawei-pod2-trigger'
+ name: 'compass-os-ocl-nofeature-ha-huawei-pod2-master-trigger'
triggers:
- - timed: '0 9 * * *'
+ - timed: ''
+
- trigger:
- name: 'compass-os-nosdn-nofeature-ha-huawei-pod1-trigger'
+ name: 'compass-os-nosdn-nofeature-ha-huawei-pod1-master-trigger'
triggers:
- - timed: '0 3 * * * '
+ - timed: '0 3 * * *'
- trigger:
- name: 'compass-os-odl_l2-nofeature-ha-huawei-pod1-trigger'
+ name: 'compass-os-odl_l2-nofeature-ha-huawei-pod1-master-trigger'
triggers:
- timed: '0 21 * * *'
- trigger:
- name: 'compass-os-odl_l3-nofeature-ha-huawei-pod1-trigger'
+ name: 'compass-os-odl_l3-nofeature-ha-huawei-pod1-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'compass-os-onos-nofeature-ha-huawei-pod1-trigger'
+ name: 'compass-os-onos-nofeature-ha-huawei-pod1-master-trigger'
triggers:
- timed: '0 15 * * *'
- trigger:
- name: 'compass-os-ocl-nofeature-ha-huawei-pod1-trigger'
+ name: 'compass-os-ocl-nofeature-ha-huawei-pod1-master-trigger'
triggers:
- timed: '0 9 * * *'
+
- trigger:
- name: 'compass-os-nosdn-nofeature-ha-intel-pod8-trigger'
+ name: 'compass-os-nosdn-nofeature-ha-huawei-pod1-brahmaputra-trigger'
triggers:
- - timed: '0 3 * * *'
+ - timed: ''
- trigger:
- name: 'compass-os-odl_l2-nofeature-ha-intel-pod8-trigger'
+ name: 'compass-os-odl_l2-nofeature-ha-huawei-pod1-brahmaputra-trigger'
triggers:
- - timed: '0 21 * * *'
+ - timed: ''
- trigger:
- name: 'compass-os-odl_l3-nofeature-ha-intel-pod8-trigger'
+ name: 'compass-os-odl_l3-nofeature-ha-huawei-pod1-brahmaputra-trigger'
triggers:
- timed: ''
- trigger:
- name: 'compass-os-onos-nofeature-ha-intel-pod8-trigger'
+ name: 'compass-os-onos-nofeature-ha-huawei-pod1-brahmaputra-trigger'
triggers:
- - timed: '0 15 * * *'
+ - timed: ''
- trigger:
- name: 'compass-os-ocl-nofeature-ha-intel-pod8-trigger'
+ name: 'compass-os-ocl-nofeature-ha-huawei-pod1-brahmaputra-trigger'
triggers:
- - timed: '0 9 * * *'
+ - timed: ''
+
+- trigger:
+ name: 'compass-os-nosdn-nofeature-ha-intel-pod8-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'compass-os-odl_l2-nofeature-ha-intel-pod8-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'compass-os-odl_l3-nofeature-ha-intel-pod8-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'compass-os-onos-nofeature-ha-intel-pod8-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'compass-os-ocl-nofeature-ha-intel-pod8-master-trigger'
+ triggers:
+ - timed: ''
+
- trigger:
- name: 'compass-os-nosdn-nofeature-ha-huawei-virtual-trigger'
+ name: 'compass-os-nosdn-nofeature-ha-huawei-virtual-master-trigger'
triggers:
- timed: '0 3 * * *'
- trigger:
- name: 'compass-os-odl_l2-nofeature-ha-huawei-virtual-trigger'
+ name: 'compass-os-odl_l2-nofeature-ha-huawei-virtual-master-trigger'
triggers:
- timed: '0 21 * * *'
- trigger:
- name: 'compass-os-odl_l3-nofeature-ha-huawei-virtual-trigger'
+ name: 'compass-os-odl_l3-nofeature-ha-huawei-virtual-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'compass-os-onos-nofeature-ha-huawei-virtual-trigger'
+ name: 'compass-os-onos-nofeature-ha-huawei-virtual-master-trigger'
triggers:
- timed: '0 15 * * *'
- trigger:
- name: 'compass-os-ocl-nofeature-ha-huawei-virtual-trigger'
+ name: 'compass-os-ocl-nofeature-ha-huawei-virtual-master-trigger'
triggers:
- timed: '0 9 * * *'
+- trigger:
+ name: 'compass-os-nosdn-nofeature-ha-huawei-virtual-brahmaputra-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'compass-os-odl_l2-nofeature-ha-huawei-virtual-brahmaputra-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'compass-os-odl_l3-nofeature-ha-huawei-virtual-brahmaputra-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'compass-os-onos-nofeature-ha-huawei-virtual-brahmaputra-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'compass-os-ocl-nofeature-ha-huawei-virtual-brahmaputra-trigger'
+ triggers:
+ - timed: ''
diff --git a/jjb/compass4nfv/compass-deploy.sh b/jjb/compass4nfv/compass-deploy.sh
index 790d43b87..7d09d5311 100644
--- a/jjb/compass4nfv/compass-deploy.sh
+++ b/jjb/compass4nfv/compass-deploy.sh
@@ -24,12 +24,19 @@ echo 1 > /proc/sys/vm/drop_caches
export CONFDIR=$WORKSPACE/deploy/conf
export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
+
+if [[ "${DEPLOY_SCENARIO}" =~ "-ocl" ]]; then
+ export NETWORK_CONF_FILE=network_ocl.yml
+else
+ export NETWORK_CONF_FILE=network.yml
+fi
+
if [[ "$NODE_NAME" =~ "-virtual" ]]; then
- export NETWORK_CONF=$CONFDIR/vm_environment/$NODE_NAME/network.yml
+ export NETWORK_CONF=$CONFDIR/vm_environment/$NODE_NAME/${NETWORK_CONF_FILE}
export DHA_CONF=$CONFDIR/vm_environment/${DEPLOY_SCENARIO}.yml
else
export INSTALL_NIC=eth1
- export NETWORK_CONF=$CONFDIR/hardware_environment/$NODE_NAME/network.yml
+ export NETWORK_CONF=$CONFDIR/hardware_environment/$NODE_NAME/${NETWORK_CONF_FILE}
export DHA_CONF=$CONFDIR/hardware_environment/$NODE_NAME/${DEPLOY_SCENARIO}.yml
fi
diff --git a/jjb/compass4nfv/compass-project-jobs.yml b/jjb/compass4nfv/compass-project-jobs.yml
index 4898b8726..920923a34 100644
--- a/jjb/compass4nfv/compass-project-jobs.yml
+++ b/jjb/compass4nfv/compass-project-jobs.yml
@@ -6,13 +6,13 @@
project: 'compass4nfv'
+ pod: 'huawei-virtual'
+
stream:
- master:
- slave_name: 'huawei-virtual1'
branch: '{stream}'
gs-pathname: ''
- brahmaputra:
- slave_name: 'huawei-virtual2'
branch: 'stable/{stream}'
gs-pathname: '/{stream}'
@@ -58,8 +58,8 @@
- compass-project-parameter:
installer: '{installer}'
gs-pathname: '{gs-pathname}'
- - 'huawei-virtual-defaults'
- '{installer}-defaults'
+ - '{pod}-defaults'
- string:
name: DEPLOY_SCENARIO
default: 'os-nosdn-nofeature-ha'
@@ -95,6 +95,17 @@
current-parameters: true
same-node: true
block: true
+ - trigger-builds:
+ - project: 'functest-compass-{pod}-suite-{stream}'
+ current-parameters: true
+ predefined-parameters:
+ FUNCTEST_SUITE_NAME=vping_userdata
+ same-node: true
+ block: true
+ block-thresholds:
+ build-step-failure-threshold: 'never'
+ failure-threshold: 'never'
+ unstable-threshold: 'FAILURE'
- job-template:
name: 'compass-verify-deploy-{stream}'
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index ce7be1fa9..4b11c4bfc 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -232,112 +232,20 @@
- builder:
name: functest-suite
builders:
- - shell: |
- #!/bin/bash
- set -e
- branch=${GIT_BRANCH##*/}
- echo "Functest: run $FUNCTEST_SUITE_NAME on branch ${branch}"
- if [[ ${branch} == *"brahmaputra"* ]]; then
- cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME"
- else
- cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t $FUNCTEST_SUITE_NAME"
- fi
- container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
- docker exec $container_id $cmd
-
+ - shell:
+ !include-raw: ./functest-suite.sh
- builder:
name: functest-daily
builders:
- - shell: |
- #!/bin/bash
- set +e
- branch=${GIT_BRANCH##*/}
- [[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+="-r"
- if [[ ${branch} == *"brahmaputra"* ]]; then
- cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh -s ${flags}"
- else
- cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t all ${flags}"
- fi
- container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
- docker exec $container_id $cmd
+ - shell:
+ !include-raw: ./functest-daily.sh
- builder:
name: set-functest-env
builders:
- - shell: |
- #!/bin/bash
- set -e
- [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
- # labconfig is used only for joid
- labconfig=""
- if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
- if sudo virsh list | grep instack; then
- instack_mac=$(sudo virsh domiflist instack | grep default | \
- grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+")
- elif sudo virsh list | grep undercloud; then
- instack_mac=$(sudo virsh domiflist undercloud | grep default | \
- grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+")
- else
- echo "No available installer VM exists...exiting"
- exit 1
- fi
- INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk {'print $1'})
- sshkey="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa"
- if sudo iptables -C FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then
- sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable
- fi
- if sudo iptables -C FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then
- sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable
- fi
- elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then
- # If production lab then creds may be retrieved dynamically
- # creds are on the jumphost, always in the same folder
- labconfig="-v $LAB_CONFIG/admin-openrc:/home/opnfv/functest/conf/openstack.creds"
- # If dev lab, credentials may not be the default ones, just provide a path to put them into docker
- # replace the default one by the customized one provided by jenkins config
- fi
- echo "Functest: Start Docker and prepare environment"
- envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
- -e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \
- -e BUILD_TAG=${BUILD_TAG} -e CI_DEBUG=${CI_DEBUG}"
- branch=${GIT_BRANCH##*/}
- dir_result="${HOME}/opnfv/functest/results/${branch}"
- mkdir -p ${dir_result}
- sudo rm -rf ${dir_result}/*
- res_volume="-v ${dir_result}:/home/opnfv/functest/results"
- custom_params=
- test -f ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG} && custom_params=$(cat ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG})
-
- echo "Functest: Pulling image opnfv/functest:${DOCKER_TAG}"
- docker pull opnfv/functest:$DOCKER_TAG >/dev/null
-
- cmd="sudo docker run --privileged=true -id ${envs} ${labconfig} ${sshkey} ${res_volume} ${custom_params} opnfv/functest:${DOCKER_TAG} /bin/bash"
- echo "Functest: Running docker run command: ${cmd}"
- ${cmd} >${redirect}
- sleep 5
- container_id=$(docker ps | grep "opnfv/functest:${DOCKER_TAG}" | awk '{print $1}' | head -1)
- echo "Container ID=${container_id}"
- if [ -z ${container_id} ]; then
- echo "Cannot find opnfv/functest container ID ${container_id}. Please check if it is existing."
- docker ps -a
- exit 1
- fi
- echo "Starting the container: docker start ${container_id}"
- docker start ${container_id}
- sleep 5
- docker ps >${redirect}
- if [ $(docker ps | grep "opnfv/functest:${DOCKER_TAG}" | wc -l) == 0 ]; then
- echo "The container opnfv/functest with ID=${container_id} has not been properly started. Exiting..."
- exit 1
- fi
- if [[ ${branch} == *"brahmaputra"* ]]; then
- cmd="${FUNCTEST_REPO_DIR}/docker/prepare_env.sh"
- else
- cmd="python ${FUNCTEST_REPO_DIR}/ci/prepare_env.py start"
- fi
- echo "Executing command inside the docker: ${cmd}"
- docker exec ${container_id} ${cmd}
+ - shell:
+ !include-raw: ./set-functest-env.sh
- builder:
name: functest-store-results
@@ -348,24 +256,5 @@
- builder:
name: functest-cleanup
builders:
- - shell: |
- #!/bin/bash
- [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
-
- echo "Cleaning up docker containers/images..."
- # Remove previous running containers if exist
- if [[ ! -z $(docker ps -a | grep opnfv/functest) ]]; then
- echo "Removing existing opnfv/functest containers..."
- docker ps -a | grep opnfv/functest | awk '{print $1}' | xargs docker rm -f >${redirect}
- fi
-
- # Remove existing images if exist
- if [[ ! -z $(docker images | grep opnfv/functest) ]]; then
- echo "Docker images to remove:"
- docker images | head -1 && docker images | grep opnfv/functest >${redirect}
- image_tags=($(docker images | grep opnfv/functest | awk '{print $2}'))
- for tag in "${image_tags[@]}"; do
- echo "Removing docker image opnfv/functest:$tag..."
- docker rmi opnfv/functest:$tag >/dev/null
- done
- fi
+ - shell:
+ !include-raw: ./functest-cleanup.sh
diff --git a/jjb/functest/functest-cleanup.sh b/jjb/functest/functest-cleanup.sh
new file mode 100755
index 000000000..4bedfe7de
--- /dev/null
+++ b/jjb/functest/functest-cleanup.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
+
+echo "Cleaning up docker containers/images..."
+# Remove previous running containers if exist
+if [[ ! -z $(docker ps -a | grep opnfv/functest) ]]; then
+ echo "Removing existing opnfv/functest containers..."
+ docker ps -a | grep opnfv/functest | awk '{print $1}' | xargs docker rm -f >${redirect}
+fi
+
+# Remove existing images if exist
+if [[ ! -z $(docker images | grep opnfv/functest) ]]; then
+ echo "Docker images to remove:"
+ docker images | head -1 && docker images | grep opnfv/functest >${redirect}
+ image_tags=($(docker images | grep opnfv/functest | awk '{print $2}'))
+ for tag in "${image_tags[@]}"; do
+ echo "Removing docker image opnfv/functest:$tag..."
+ docker rmi opnfv/functest:$tag >/dev/null
+ done
+fi
diff --git a/jjb/functest/functest-daily.sh b/jjb/functest/functest-daily.sh
new file mode 100755
index 000000000..5abddfd84
--- /dev/null
+++ b/jjb/functest/functest-daily.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+set +e
+
+branch=${GIT_BRANCH##*/}
+[[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+="-r"
+if [[ ${branch} == *"brahmaputra"* ]]; then
+ cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh -s ${flags}"
+else
+ cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t all ${flags}"
+fi
+container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
+docker exec $container_id $cmd
diff --git a/jjb/functest/functest-suite.sh b/jjb/functest/functest-suite.sh
new file mode 100755
index 000000000..7e9fa09db
--- /dev/null
+++ b/jjb/functest/functest-suite.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+set -e
+
+branch=${GIT_BRANCH##*/}
+echo "Functest: run $FUNCTEST_SUITE_NAME on branch ${branch}"
+if [[ ${branch} == *"brahmaputra"* ]]; then
+ cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME"
+else
+ cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t $FUNCTEST_SUITE_NAME"
+fi
+container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
+docker exec $container_id $cmd
diff --git a/jjb/functest/set-functest-env.sh b/jjb/functest/set-functest-env.sh
new file mode 100755
index 000000000..b3be3abe1
--- /dev/null
+++ b/jjb/functest/set-functest-env.sh
@@ -0,0 +1,73 @@
+#!/bin/bash
+
+set -e
+[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
+# labconfig is used only for joid
+labconfig=""
+if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
+ if sudo virsh list | grep instack; then
+ instack_mac=$(sudo virsh domiflist instack | grep default | \
+ grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+")
+ elif sudo virsh list | grep undercloud; then
+ instack_mac=$(sudo virsh domiflist undercloud | grep default | \
+ grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+")
+ else
+ echo "No available installer VM exists...exiting"
+ exit 1
+ fi
+ INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk {'print $1'})
+ sshkey="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa"
+ if sudo iptables -C FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then
+ sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable
+ fi
+ if sudo iptables -C FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then
+ sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable
+ fi
+elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then
+ # If production lab then creds may be retrieved dynamically
+ # creds are on the jumphost, always in the same folder
+ labconfig="-v $LAB_CONFIG/admin-openrc:/home/opnfv/functest/conf/openstack.creds"
+ # If dev lab, credentials may not be the default ones, just provide a path to put them into docker
+ # replace the default one by the customized one provided by jenkins config
+fi
+echo "Functest: Start Docker and prepare environment"
+envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
+ -e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \
+ -e BUILD_TAG=${BUILD_TAG} -e CI_DEBUG=${CI_DEBUG}"
+branch=${GIT_BRANCH##*/}
+dir_result="${HOME}/opnfv/functest/results/${branch}"
+mkdir -p ${dir_result}
+sudo rm -rf ${dir_result}/*
+res_volume="-v ${dir_result}:/home/opnfv/functest/results"
+custom_params=
+test -f ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG} && custom_params=$(cat ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG})
+
+echo "Functest: Pulling image opnfv/functest:${DOCKER_TAG}"
+docker pull opnfv/functest:$DOCKER_TAG >/dev/null
+
+cmd="sudo docker run --privileged=true -id ${envs} ${labconfig} ${sshkey} ${res_volume} ${custom_params} opnfv/functest:${DOCKER_TAG} /bin/bash"
+echo "Functest: Running docker run command: ${cmd}"
+${cmd} >${redirect}
+sleep 5
+container_id=$(docker ps | grep "opnfv/functest:${DOCKER_TAG}" | awk '{print $1}' | head -1)
+echo "Container ID=${container_id}"
+if [ -z ${container_id} ]; then
+ echo "Cannot find opnfv/functest container ID ${container_id}. Please check if it is existing."
+ docker ps -a
+ exit 1
+fi
+echo "Starting the container: docker start ${container_id}"
+docker start ${container_id}
+sleep 5
+docker ps >${redirect}
+if [ $(docker ps | grep "opnfv/functest:${DOCKER_TAG}" | wc -l) == 0 ]; then
+ echo "The container opnfv/functest with ID=${container_id} has not been properly started. Exiting..."
+ exit 1
+fi
+if [[ ${branch} == *"brahmaputra"* ]]; then
+ cmd="${FUNCTEST_REPO_DIR}/docker/prepare_env.sh"
+else
+ cmd="python ${FUNCTEST_REPO_DIR}/ci/prepare_env.py start"
+fi
+echo "Executing command inside the docker: ${cmd}"
+docker exec ${container_id} ${cmd}
diff --git a/jjb/opnfv/opnfv-docker.sh b/jjb/opnfv/opnfv-docker.sh
index 1093d5fec..ef4738482 100644
--- a/jjb/opnfv/opnfv-docker.sh
+++ b/jjb/opnfv/opnfv-docker.sh
@@ -75,10 +75,10 @@ elif [[ "$DOCKER_REPO_NAME" == "opnfv/functest" ]]; then
cd $WORKSPACE/docker
elif [[ "$DOCKER_REPO_NAME" == "opnfv/qtip" ]]; then
cd $WORKSPACE/docker
-elif [[ "$DOCKER_REPO_NAME" == "opnfv/storeperf" ]]; then
+elif [[ "$DOCKER_REPO_NAME" == "opnfv/storperf" ]]; then
cd $WORKSPACE/docker
elif [[ "$DOCKER_REPO_NAME" == "opnfv/yardstick" ]]; then
- cd $WORKSPACE/ci/docker/yardstick-ci
+ cd $WORKSPACE/tests/ci/docker/yardstick-ci
else
echo "ERROR: DOCKER_REPO_NAME parameter not valid: $DOCKER_REPO_NAME"
exit 1
diff --git a/jjb/yardstick/yardstick-ci-jobs.yml b/jjb/yardstick/yardstick-ci-jobs.yml
index a907d3492..b7c1c0a82 100644
--- a/jjb/yardstick/yardstick-ci-jobs.yml
+++ b/jjb/yardstick/yardstick-ci-jobs.yml
@@ -218,7 +218,7 @@
publishers:
- email:
- recipients: ana.cunha@ericsson.com
+ recipients: jean.gaoliang@huawei.com matthew.lijun@huawei.com
########################
# builder macros
@@ -226,58 +226,14 @@
- builder:
name: yardstick-daily
builders:
- - shell: |
- #!/bin/bash
- set -e
- [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
-
- # labconfig is used only for joid
- labconfig=""
- sshkey=""
- if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
- instack_mac=$(sudo virsh domiflist instack | grep default | \
- grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+")
- INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk {'print $1'})
- sshkey="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa"
- if [[ -n $(sudo iptables -L FORWARD |grep "REJECT"|grep "reject-with icmp-port-unreachable") ]]; then
- #note: this happens only in opnfv-lf-pod1
- sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable
- sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable
- fi
- elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then
- # If production lab then creds may be retrieved dynamically
- # creds are on the jumphost, always in the same folder
- labconfig="-v $LAB_CONFIG/admin-openrc:/home/opnfv/openrc"
- # If dev lab, credentials may not be the default ones, just provide a path to put them into docker
- # replace the default one by the customized one provided by jenkins config
- fi
-
- opts="--privileged=true --rm"
- envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
- -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NETWORK=${EXTERNAL_NETWORK} \
- -e YARDSTICK_BRANCH=${GIT_BRANCH##origin/} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO}"
-
- # Pull the latest image
- docker pull opnfv/yardstick:$DOCKER_TAG >$redirect
-
- # Run docker
- cmd="sudo docker run ${opts} ${envs} ${labconfig} ${sshkey} opnfv/yardstick \
- run_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SUITE_NAME}"
- echo "Yardstick: Running docker cmd: ${cmd}"
- ${cmd}
-
- echo "Yardstick: done!"
+ - shell:
+ !include-raw: ./yardstick-daily.sh
- builder:
name: yardstick-vtcdaily
builders:
- - shell: |
- #!/bin/bash
- set -e
- [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
-
- cd $WORKSPACE
- ./ci/apexlake-verify
+ - shell:
+ !include-raw: ./yardstick-vtcdaily.sh
- builder:
name: yardstick-fetch-os-creds
@@ -288,29 +244,8 @@
- builder:
name: yardstick-cleanup
builders:
- - shell: |
- #!/bin/bash
- [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
-
- echo "Cleaning up docker containers/images..."
- # Remove previous running containers if exist
- if [[ ! -z $(docker ps -a | grep opnfv/yardstick) ]]; then
- echo "Removing existing opnfv/yardstick containers..."
- docker ps -a | grep opnfv/yardstick | awk '{print $1}' | xargs docker rm -f >$redirect
-
- fi
-
- # Remove existing images if exist
- if [[ ! -z $(docker images | grep opnfv/yardstick) ]]; then
- echo "Docker images to remove:"
- docker images | head -1 && docker images | grep opnfv/yardstick
- image_tags=($(docker images | grep opnfv/yardstick | awk '{print $2}'))
- for tag in "${image_tags[@]}"; do
- echo "Removing docker image opnfv/yardstick:$tag..."
- docker rmi opnfv/yardstick:$tag >$redirect
-
- done
- fi
+ - shell:
+ !include-raw: ./yardstick-cleanup.sh
########################
# parameter macros
########################
diff --git a/jjb/yardstick/yardstick-cleanup.sh b/jjb/yardstick/yardstick-cleanup.sh
new file mode 100755
index 000000000..4e6f7d680
--- /dev/null
+++ b/jjb/yardstick/yardstick-cleanup.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
+
+echo "Cleaning up docker containers/images..."
+# Remove previous running containers if exist
+if [[ ! -z $(docker ps -a | grep opnfv/yardstick) ]]; then
+ echo "Removing existing opnfv/yardstick containers..."
+ docker ps -a | grep opnfv/yardstick | awk '{print $1}' | xargs docker rm -f >$redirect
+
+fi
+
+# Remove existing images if exist
+if [[ ! -z $(docker images | grep opnfv/yardstick) ]]; then
+ echo "Docker images to remove:"
+ docker images | head -1 && docker images | grep opnfv/yardstick
+ image_tags=($(docker images | grep opnfv/yardstick | awk '{print $2}'))
+ for tag in "${image_tags[@]}"; do
+ echo "Removing docker image opnfv/yardstick:$tag..."
+ docker rmi opnfv/yardstick:$tag >$redirect
+
+ done
+fi
diff --git a/jjb/yardstick/yardstick-daily.sh b/jjb/yardstick/yardstick-daily.sh
new file mode 100755
index 000000000..3ad6b7c7c
--- /dev/null
+++ b/jjb/yardstick/yardstick-daily.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+set -e
+[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
+
+# labconfig is used only for joid
+labconfig=""
+sshkey=""
+if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
+ instack_mac=$(sudo virsh domiflist instack | grep default | \
+ grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+")
+ INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk {'print $1'})
+ sshkey="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa"
+ if [[ -n $(sudo iptables -L FORWARD |grep "REJECT"|grep "reject-with icmp-port-unreachable") ]]; then
+ #note: this happens only in opnfv-lf-pod1
+ sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable
+ sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable
+ fi
+elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then
+ # If production lab then creds may be retrieved dynamically
+ # creds are on the jumphost, always in the same folder
+ labconfig="-v $LAB_CONFIG/admin-openrc:/home/opnfv/openrc"
+ # If dev lab, credentials may not be the default ones, just provide a path to put them into docker
+ # replace the default one by the customized one provided by jenkins config
+fi
+
+opts="--privileged=true --rm"
+envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
+ -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NETWORK=${EXTERNAL_NETWORK} \
+ -e YARDSTICK_BRANCH=${GIT_BRANCH##origin/} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO}"
+
+# Pull the latest image
+docker pull opnfv/yardstick:$DOCKER_TAG >$redirect
+
+# Run docker
+cmd="sudo docker run ${opts} ${envs} ${labconfig} ${sshkey} opnfv/yardstick \
+ run_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SUITE_NAME}"
+echo "Yardstick: Running docker cmd: ${cmd}"
+${cmd}
+
+echo "Yardstick: done!"
diff --git a/jjb/yardstick/yardstick-project-jobs.yml b/jjb/yardstick/yardstick-project-jobs.yml
index f06bf7077..c6f317386 100644
--- a/jjb/yardstick/yardstick-project-jobs.yml
+++ b/jjb/yardstick/yardstick-project-jobs.yml
@@ -121,7 +121,7 @@
# install python packages
easy_install -U setuptools
easy_install -U pip
- pip install -r ci/requirements.txt
+ pip install -r tests/ci/requirements.txt
pip install -e .
# unit tests
diff --git a/jjb/yardstick/yardstick-vtcdaily.sh b/jjb/yardstick/yardstick-vtcdaily.sh
new file mode 100755
index 000000000..737d6806e
--- /dev/null
+++ b/jjb/yardstick/yardstick-vtcdaily.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+set -e
+[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
+
+cd $WORKSPACE
+./tests/ci/apexlake-verify
diff --git a/utils/test/result_collection_api/README.md b/utils/test/result_collection_api/README.md
index d73274c69..2798db6e3 100644
--- a/utils/test/result_collection_api/README.md
+++ b/utils/test/result_collection_api/README.md
@@ -6,6 +6,7 @@ Install:
```
pip install testtools
pip install discover
+pip install futures
```
## How to: