Tim Rozet (Red Hat, trozet@redhat.com)
Morgan Richomme (Orange, morgan.richomme@orange.com)
Matthew Lijun (Huawei, matthew.lijun@huawei.com)
-Peter Bandzi (Cisco, pbandzi@cisco.com)
Jose Lausuch (Ericsson, jose.lausuch@ericsson.com)
Ryota Mibu (NEC, r-mibu@cq.jp.nec.com)
+Mei Mei (Huawei, meimei@huawei.com)
Link to TSC approval of the project: http://ircbot.wl.linuxfoundation.org/meetings/opnfv-meeting/2015/opnfv-meeting.2015-07-14-14.00.html
+Link to TSC voting for removal of Victor Laza as committer: http://meetbot.opnfv.org/meetings/opnfv-meeting/2016/opnfv-meeting.2016-02-16-14.59.html
+Link to nomination and acceptance of Mei Mei as committer: http://lists.opnfv.org/pipermail/opnfv-tsc/2016-March/002228.html
+Sphinx==1.3.1
+doc8
+docutils
+setuptools
+six
sphinxcontrib-httpdomain
See http://sphinx-doc.org/rest.html .
-You can add dedicated contents by using 'only' directive with build type
-('html' and 'pdf') for OPNFV document
+**Hint:**
+Table and its contents won't be adjusted, so you may need to fix your source
+text when your table is truncated in PDF version. Or, you can use 'longtable'
+option that splits your table vertically (by rows) in multiple pages.
+It is useful if you have trouble in rendering table containing many rows.
+
+.. code-block:: bash
+
+ .. table::
+ :class: longtable
+
+ +------------------------+------------+----------+----------+
+ | Header row, column 1 | Header 2 | Header 3 | Header 4 |
+ +========================+============+==========+==========+
+ | body row 1, column 1 | column 2 | column 3 | column 4 |
+ +------------------------+------------+----------+----------+
+ | body row 2 | ... | ... | |
+ +------------------------+------------+----------+----------+
-Example :
+**Hint:**
+You can add dedicated contents by using 'only' directive with build type
+('html' and 'pdf') for OPNFV document. But, this is not encouraged to use
+since this may make different views in HTML and PDF version.
.. code-block:: bash
See http://sphinx-doc.org/config.html to learn sphinx configuration.
-Note: you can leave the file path for OPNFV logo image which will be prepared
+**Note:**
+You can leave the file path for OPNFV logo image which will be prepared
before each document build.
+**Hint:**
+In PDF, figures will be floated to get better view. If you want to avoid such
+automated fixes, just add this option to your conf.py after copying the default
+configuration in to the document directory.
+
+.. code-block:: bash
+
+ latex_elements = {'figure_align': 'H'}
+
Versioning
==========
branch: 'master'
gs-pathname: ''
block-stream: 'brahmaputra'
- slave: 'intel-pod7'
+ slave: 'opnfv-jump-1'
- brahmaputra:
branch: 'stable/brahmaputra'
gs-pathname: '/brahmaputra'
- 'apex-build'
- trigger-builds:
- project: 'apex-deploy-virtual-os-odl_l2-nofeature-ha-{stream}'
- predefined-parameters:
+ predefined-parameters: |
BUILD_DIRECTORY=apex-verify-{stream}/build_output
+ OPNFV_CLEAN=yes
git-revision: false
block: true
- trigger-builds:
- project: 'apex-deploy-virtual-os-onos-nofeature-ha-{stream}'
- predefined-parameters:
+ predefined-parameters: |
BUILD_DIRECTORY=apex-verify-{stream}/build_output
+ OPNFV_CLEAN=yes
git-revision: false
block: true
- trigger-builds:
- project: 'apex-deploy-virtual-os-odl_l3-nofeature-ha-{stream}'
- predefined-parameters:
+ predefined-parameters: |
BUILD_DIRECTORY=apex-verify-{stream}/build_output
+ OPNFV_CLEAN=yes
git-revision: false
block: true
- trigger-builds:
- project: 'apex-deploy-virtual-os-odl_l2-sfc-noha-{stream}'
- predefined-parameters:
+ predefined-parameters: |
BUILD_DIRECTORY=apex-verify-{stream}/build_output
+ OPNFV_CLEAN=yes
git-revision: false
block: true
- 'apex-workspace-cleanup'
builders:
- trigger-builds:
- project: 'apex-deploy-{platform}-{scenario}-{stream}'
+ predefined-parameters:
+ OPNFV_CLEAN='yes'
git-revision: false
block: true
- trigger-builds:
# Required Variables:
# stream: branch with - in place of / (eg. stable)
# branch: branch (eg. stable)
- node: opnfv-jump-1
+ node: '{slave}'
disabled: false
name: DEPLOY_SCENARIO
default: '{scenario}'
description: "Scenario to deploy with."
+ - string:
+ name: OPNFV_CLEAN
+ default: 'no'
+ description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment"
properties:
- build-blocker:
block: true
- trigger-builds:
- project: 'apex-deploy-baremetal-os-odl_l2-nofeature-ha-{stream}'
- predefined-parameters:
+ predefined-parameters: |
BUILD_DIRECTORY=apex-build-{stream}/build_output
+ OPNFV_CLEAN=yes
git-revision: true
block: true
- trigger-builds:
if echo $BUILD_TAG | grep "apex-verify" 1> /dev/null; then
if echo $GERRIT_BRANCH | grep "brahmaputra" 1> /dev/null; then
export OPNFV_ARTIFACT_VERSION=brahmaputra-dev${BUILD_NUMBER}
+ export BUILD_ARGS="-v $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY"
else
export OPNFV_ARTIFACT_VERSION=dev${BUILD_NUMBER}
+ export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY"
fi
elif [ "$ARTIFACT_VERSION" == "daily" ]; then
if echo $GERRIT_BRANCH | grep "brahmaputra" 1> /dev/null; then
export OPNFV_ARTIFACT_VERSION=brahmaputra-$(date -u +"%Y-%m-%d")
+ export BUILD_ARGS="-v $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY"
else
export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d")
+ export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY --iso"
fi
else
export OPNFV_ARTIFACT_VERSION=${ARTIFACT_VERSION}
fi
# start the build
cd $WORKSPACE/ci
- ./build.sh -v $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY
+ ./build.sh -v $OPNFV_ARTIFACT_VERSION $BUILD_ARGS
RPM_VERSION=$(grep Version $BUILD_DIRECTORY/../build/opnfv-apex.spec | awk '{ print $2 }')-$(echo $OPNFV_ARTIFACT_VERSION | tr -d '_-')
# list the contents of BUILD_OUTPUT directory
ls -al $BUILD_DIRECTORY
echo "OPNFV_RPM_MD5SUM=$(md5sum $BUILD_DIRECTORY/opnfv-apex-$RPM_VERSION.noarch.rpm | cut -d' ' -f1)"
echo "OPNFV_BUILD_URL=$BUILD_URL"
) > $WORKSPACE/opnfv.properties
- echo
echo "--------------------------------------------------------"
+ echo "Done!"
- builder:
name: 'apex-workspace-cleanup'
echo "--------------------------------------------------------"
echo
- if [[ ! "$ARTIFACT_NAME" == "latest" ]]; then
+ if [[ $BUILD_DIRECTORY == *verify-master* ]]; then
+ cd $WORKSPACE/../${BUILD_DIRECTORY/build_output/}
+ WORKSPACE=$(pwd)
+ echo "WORKSPACE modified to $WORKSPACE"
+ cd $WORKSPACE/ci
+ elif [[ ! "$ARTIFACT_NAME" == "latest" ]]; then
# if artifact name is passed the pull a
# specific artifact from artifacts.opnfv.org
RPM_INSTALL_PATH=$GS_URL/$ARTIFACT_NAME
fi
fi
- RPM_LIST=$RPM_INSTALL_PATH
- for pkg in common undercloud opendaylight-sfc; do
- RPM_LIST+=" ${RPM_INSTALL_PATH/opnfv-apex/opnfv-apex-${pkg}}"
- done
+ if [ -z "$DEPLOY_SCENARIO" ]; then
+ echo "Deploy scenario not set!"
+ exit 1
+ fi
- # update / install the new rpm
- if rpm -q opnfv-apex > /dev/null; then
- if [ $(basename $OPNFV_RPM_URL) == $(rpm -q opnfv-apex).rpm ]; then
- echo "RPM is already installed"
- elif sudo yum update -y $RPM_LIST | grep "does not update installed package"; then
- if ! sudo yum downgrade -y $RPM_LIST; then
- sudo yum remove -y opnfv-undercloud opnfv-common
- sudo yum downgrade -y $RPM_INSTALL_PATH
- fi
- fi
+ # use local build for verify
+ if [[ $BUILD_DIRECTORY == *verify-master* ]]; then
+ if [ ! -e "${WORKSPACE}/build/lib" ]; then ln -s ${WORKSPACE}/lib ${WORKSPACE}/build/lib; fi
+ DEPLOY_CMD="./deploy.sh -c ${WORKSPACE}/build -r ${WORKSPACE}/build/images/"
+ DEPLOY_FILE="${WORKSPACE}/config/deploy/${DEPLOY_SCENARIO}.yaml"
+ NETWORK_FILE="${WORKSPACE}/config/network/network_settings.yaml"
else
- sudo yum install -y $RPM_LIST;
+ RPM_LIST=$RPM_INSTALL_PATH
+ for pkg in common undercloud opendaylight-sfc; do
+ RPM_LIST+=" ${RPM_INSTALL_PATH/opnfv-apex/opnfv-apex-${pkg}}"
+ done
+
+ # update / install the new rpm
+ if rpm -q opnfv-apex > /dev/null; then
+ if [ $(basename $OPNFV_RPM_URL) == $(rpm -q opnfv-apex).rpm ]; then
+ echo "RPM is already installed"
+ elif sudo yum update -y $RPM_LIST | grep "does not update installed package"; then
+ if ! sudo yum downgrade -y $RPM_LIST; then
+ sudo yum remove -y opnfv-undercloud opnfv-common
+ sudo yum downgrade -y $RPM_INSTALL_PATH
+ fi
+ fi
+ else
+ sudo yum install -y $RPM_LIST;
+ fi
+ DEPLOY_CMD=opnfv-deploy
+ DEPLOY_FILE="/etc/opnfv-apex/${DEPLOY_SCENARIO}.yaml"
+ NETWORK_FILE="/etc/opnfv-apex/network_settings.yaml"
fi
- # cleanup virtual machines before we start
- sudo opnfv-clean
- # initiate virtual deployment
- if [ -e /etc/opnfv-apex/network_settings.yaml ]; then
- if [ -n "$DEPLOY_SCENARIO" ]; then
- echo "Deploy Scenario set to ${DEPLOY_SCENARIO}"
- if [ -e /etc/opnfv-apex/${DEPLOY_SCENARIO}.yaml ]; then
- sudo opnfv-deploy -v -d /etc/opnfv-apex/${DEPLOY_SCENARIO}.yaml -n /etc/opnfv-apex/network_settings.yaml --debug
+ if [ "$OPNFV_CLEAN" == 'yes' ]; then
+ if [[ $BUILD_DIRECTORY == *verify-master* ]]; then
+ sudo ./clean.sh
else
- echo "File does not exist /etc/opnfv-apex/${DEPLOY_SCENARIO}.yaml"
- exit 1
+ sudo opnfv-clean
fi
- else
- echo "Deploy scenario not set!"
- exit 1
- fi
+ fi
+ # initiate virtual deployment
+ echo "Deploy Scenario set to ${DEPLOY_SCENARIO}"
+ if [ -e $DEPLOY_FILE ]; then
+ sudo $DEPLOY_CMD -v -d ${DEPLOY_FILE} -n $NETWORK_FILE --debug
else
- sudo opnfv-deploy -v
+ echo "File does not exist /etc/opnfv-apex/${DEPLOY_SCENARIO}.yaml"
+ exit 1
fi
echo
echo "--------------------------------------------------------"
- trigger:
name: 'compass-os-nosdn-nofeature-ha-huawei-us-deploy-bare-2-trigger'
triggers:
- - timed: ''
+ - timed: '0 3 * * *'
- trigger:
name: 'compass-os-odl_l2-nofeature-ha-huawei-us-deploy-bare-2-trigger'
triggers:
- - timed: ''
+ - timed: '0 21 * * *'
- trigger:
name: 'compass-os-odl_l3-nofeature-ha-huawei-us-deploy-bare-2-trigger'
triggers:
- trigger:
name: 'compass-os-onos-nofeature-ha-huawei-us-deploy-bare-2-trigger'
triggers:
- - timed: ''
+ - timed: '0 15 * * *'
- trigger:
name: 'compass-os-ocl-nofeature-ha-huawei-us-deploy-bare-2-trigger'
triggers:
- - timed: ''
+ - timed: '0 9 * * *'
- trigger:
name: 'compass-os-nosdn-nofeature-ha-huawei-us-deploy-bare-1-trigger'
triggers:
#--------------------------------
scenario:
# HA scenarios
+ - 'os-nosdn-nofeature-ha':
+ auto-trigger-name: 'fuel-{scenario}-{pod}-{stream}-trigger'
- 'os-odl_l2-nofeature-ha':
auto-trigger-name: 'fuel-{scenario}-{pod}-{stream}-trigger'
- 'os-odl_l3-nofeature-ha':
auto-trigger-name: 'fuel-{scenario}-{pod}-{stream}-trigger'
- 'os-onos-nofeature-ha':
auto-trigger-name: 'fuel-{scenario}-{pod}-{stream}-trigger'
+ - 'os-odl_l2-bgpvpn-ha':
+ auto-trigger-name: 'fuel-{scenario}-{pod}-{stream}-trigger'
+ - 'os-odl_l2-sfc-ha':
+ auto-trigger-name: 'fuel-{scenario}-{pod}-{stream}-trigger'
- 'os-nosdn-kvm-ha':
- auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ auto-trigger-name: 'fuel-{scenario}-{pod}-{stream}-trigger'
- 'os-nosdn-ovs-ha':
auto-trigger-name: 'fuel-{scenario}-{pod}-{stream}-trigger'
- - 'os-nosdn-nofeature-ha':
- auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
- - 'os-odl_l2-bgpvpn-ha':
- auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
- - 'os-odl_l2-sfc-ha':
- auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
- 'os-nosdn-kvm_ovs-ha':
auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
- 'os-nosdn-vlan-ha':
# trigger macros
########################
# os-nosdn-nofeature-ha trigger
+# CI PODs
+#-----------------------------------------------
+# LF POD2 Triggers running against master branch
+#-----------------------------------------------
- trigger:
name: 'fuel-os-nosdn-nofeature-ha-opnfv-jump-2-master-trigger'
+ triggers:
+ - timed: '0 0 * * *'
+- trigger:
+ name: 'fuel-os-odl_l2-nofeature-ha-opnfv-jump-2-master-trigger'
+ triggers:
+ - timed: '0 3 * * *'
+- trigger:
+ name: 'fuel-os-odl_l3-nofeature-ha-opnfv-jump-2-master-trigger'
+ triggers:
+ - timed: '0 6 * * *'
+- trigger:
+ name: 'fuel-os-onos-nofeature-ha-opnfv-jump-2-master-trigger'
+ triggers:
+ - timed: '0 9 * * *'
+- trigger:
+ name: 'fuel-os-odl_l2-bgpvpn-ha-opnfv-jump-2-master-trigger'
+ triggers:
+ - timed: '0 12 * * *'
+- trigger:
+ name: 'fuel-os-odl_l2-sfc-ha-opnfv-jump-2-master-trigger'
+ triggers:
+ - timed: '0 15 * * *'
+- trigger:
+ name: 'fuel-os-nosdn-kvm-ha-opnfv-jump-2-master-trigger'
+ triggers:
+ - timed: '0 18 * * *'
+- trigger:
+ name: 'fuel-os-nosdn-ovs-ha-opnfv-jump-2-master-trigger'
+ triggers:
+ - timed: '0 21 * * *'
+- trigger:
+ name: 'fuel-os-nosdn-kvm-noha-opnfv-jump-2-master-trigger'
+ triggers:
+ - timed: ''
+#-----------------------------------------------
+# Ericsson POD2 Triggers running against brahmaputra branch
+#-----------------------------------------------
+- trigger:
+ name: 'fuel-os-nosdn-nofeature-ha-ericsson-pod2-brahmaputra-trigger'
+ triggers:
+ - timed: '0 12 * * *'
+- trigger:
+ name: 'fuel-os-odl_l2-nofeature-ha-ericsson-pod2-brahmaputra-trigger'
+ triggers:
+ - timed: '0 15 * * *'
+- trigger:
+ name: 'fuel-os-odl_l3-nofeature-ha-ericsson-pod2-brahmaputra-trigger'
+ triggers:
+ - timed: '0 18 * * *'
+- trigger:
+ name: 'fuel-os-onos-nofeature-ha-ericsson-pod2-brahmaputra-trigger'
+ triggers:
+ - timed: '0 21 * * *'
+- trigger:
+ name: 'fuel-os-odl_l2-bgpvpn-ha-ericsson-pod2-brahmaputra-trigger'
+ triggers:
+ - timed: '0 0 * * *'
+- trigger:
+ name: 'fuel-os-odl_l2-sfc-ha-ericsson-pod2-brahmaputra-trigger'
+ triggers:
+ - timed: '0 3 * * *'
+- trigger:
+ name: 'fuel-os-nosdn-kvm-ha-ericsson-pod2-brahmaputra-trigger'
+ triggers:
+ - timed: '0 6 * * *'
+- trigger:
+ name: 'fuel-os-nosdn-ovs-ha-ericsson-pod2-brahmaputra-trigger'
+ triggers:
+ - timed: '0 9 * * *'
+- trigger:
+ name: 'fuel-os-nosdn-kvm-noha-ericsson-pod2-brahmaputra-trigger'
triggers:
- timed: ''
+#-----------------------------------------------
+# Triggers for other PODs
+#-----------------------------------------------
- trigger:
name: 'fuel-os-nosdn-nofeature-ha-ericsson-pod1-master-trigger'
triggers:
name: 'fuel-os-nosdn-nofeature-ha-ericsson-pod1-brahmaputra-trigger'
triggers:
- timed: ''
-- trigger:
- name: 'fuel-os-nosdn-nofeature-ha-ericsson-pod2-brahmaputra-trigger'
- triggers:
- - timed: ''
- trigger:
name: 'fuel-os-nosdn-nofeature-ha-virtual-brahmaputra-trigger'
triggers:
- timed: ''
# os-nosdn-kvm-ha trigger
-- trigger:
- name: 'fuel-os-nosdn-kvm-ha-opnfv-jump-2-master-trigger'
- triggers:
- - timed: ''
- trigger:
name: 'fuel-os-nosdn-kvm-ha-ericsson-pod1-master-trigger'
triggers:
name: 'fuel-os-nosdn-kvm-ha-ericsson-pod1-brahmaputra-trigger'
triggers:
- timed: ''
-- trigger:
- name: 'fuel-os-nosdn-kvm-ha-ericsson-pod2-brahmaputra-trigger'
- triggers:
- - timed: ''
- trigger:
name: 'fuel-os-nosdn-kvm-ha-virtual-brahmaputra-trigger'
triggers:
- timed: ''
# os-odl_l2-nofeature-ha trigger
-- trigger:
- name: 'fuel-os-odl_l2-nofeature-ha-opnfv-jump-2-master-trigger'
- triggers:
- - timed: ''
- trigger:
name: 'fuel-os-odl_l2-nofeature-ha-ericsson-pod1-master-trigger'
triggers:
- timed: ''
- trigger:
name: 'fuel-os-odl_l2-nofeature-ha-opnfv-jump-2-brahmaputra-trigger'
- triggers:
- - timed: '0 4,10,16,22 * * *'
-- trigger:
- name: 'fuel-os-odl_l2-nofeature-ha-ericsson-pod1-brahmaputra-trigger'
triggers:
- timed: ''
- trigger:
- name: 'fuel-os-odl_l2-nofeature-ha-ericsson-pod2-brahmaputra-trigger'
+ name: 'fuel-os-odl_l2-nofeature-ha-ericsson-pod1-brahmaputra-trigger'
triggers:
- timed: ''
- trigger:
- timed: ''
# os-odl_l3-nofeature-ha trigger
-- trigger:
- name: 'fuel-os-odl_l3-nofeature-ha-opnfv-jump-2-master-trigger'
- triggers:
- - timed: ''
- trigger:
name: 'fuel-os-odl_l3-nofeature-ha-ericsson-pod1-master-trigger'
triggers:
name: 'fuel-os-odl_l3-nofeature-ha-ericsson-pod1-brahmaputra-trigger'
triggers:
- timed: ''
-- trigger:
- name: 'fuel-os-odl_l3-nofeature-ha-ericsson-pod2-brahmaputra-trigger'
- triggers:
- - timed: ''
- trigger:
name: 'fuel-os-odl_l3-nofeature-ha-virtual-brahmaputra-trigger'
triggers:
- timed: ''
# os-onos-nofeature-ha trigger
-- trigger:
- name: 'fuel-os-onos-nofeature-ha-opnfv-jump-2-master-trigger'
- triggers:
- - timed: ''
- trigger:
name: 'fuel-os-onos-nofeature-ha-ericsson-pod1-master-trigger'
triggers:
name: 'fuel-os-onos-nofeature-ha-ericsson-pod1-brahmaputra-trigger'
triggers:
- timed: ''
-- trigger:
- name: 'fuel-os-onos-nofeature-ha-ericsson-pod2-brahmaputra-trigger'
- triggers:
- - timed: ''
- trigger:
name: 'fuel-os-onos-nofeature-ha-virtual-brahmaputra-trigger'
triggers:
# os-nosdn-ovs-ha trigger
-- trigger:
- name: 'fuel-os-nosdn-ovs-ha-opnfv-jump-2-master-trigger'
- triggers:
- - timed: ''
- trigger:
name: 'fuel-os-nosdn-ovs-ha-ericsson-pod1-master-trigger'
triggers:
name: 'fuel-os-nosdn-ovs-ha-ericsson-pod1-brahmaputra-trigger'
triggers:
- timed: ''
-- trigger:
- name: 'fuel-os-nosdn-ovs-ha-ericsson-pod2-brahmaputra-trigger'
- triggers:
- - timed: ''
- trigger:
name: 'fuel-os-nosdn-ovs-ha-virtual-brahmaputra-trigger'
triggers:
- timed: ''
# os-odl_l2-bgpvpn-ha trigger
-- trigger:
- name: 'fuel-os-odl_l2-bgpvpn-ha-opnfv-jump-2-master-trigger'
- triggers:
- - timed: ''
- trigger:
name: 'fuel-os-odl_l2-bgpvpn-ha-ericsson-pod1-master-trigger'
triggers:
name: 'fuel-os-odl_l2-bgpvpn-ha-ericsson-pod1-brahmaputra-trigger'
triggers:
- timed: ''
-- trigger:
- name: 'fuel-os-odl_l2-bgpvpn-ha-ericsson-pod2-brahmaputra-trigger'
- triggers:
- - timed: ''
- trigger:
name: 'fuel-os-odl_l2-bgpvpn-ha-virtual-brahmaputra-trigger'
triggers:
- timed: ''
# os-odl_l2-sfc-ha trigger
-- trigger:
- name: 'fuel-os-odl_l2-sfc-ha-opnfv-jump-2-master-trigger'
- triggers:
- - timed: ''
- trigger:
name: 'fuel-os-odl_l2-sfc-ha-ericsson-pod1-master-trigger'
triggers:
name: 'fuel-os-odl_l2-sfc-ha-ericsson-pod1-brahmaputra-trigger'
triggers:
- timed: ''
-- trigger:
- name: 'fuel-os-odl_l2-sfc-ha-ericsson-pod2-brahmaputra-trigger'
- triggers:
- - timed: ''
- trigger:
name: 'fuel-os-odl_l2-sfc-ha-virtual-brahmaputra-trigger'
triggers:
- timed: ''
# os-nosdn-kvm-ha trigger
-- trigger:
- name: 'fuel-os-nosdn-kvm-noha-opnfv-jump-2-master-trigger'
- triggers:
- - timed: ''
- trigger:
name: 'fuel-os-nosdn-kvm-noha-ericsson-pod1-master-trigger'
triggers:
name: 'fuel-os-nosdn-kvm-noha-ericsson-pod1-brahmaputra-trigger'
triggers:
- timed: ''
-- trigger:
- name: 'fuel-os-nosdn-kvm-noha-ericsson-pod2-brahmaputra-trigger'
- triggers:
- - timed: ''
- trigger:
name: 'fuel-os-nosdn-kvm-noha-virtual-brahmaputra-trigger'
triggers:
- virtual:
installer: joid
<<: *master
+ - huawei-us-deploy-bare-2:
+ installer: compass
+ <<: *master
#--------------------------------
testsuite:
- shell: |
#!/bin/bash
set +e
- flag=""
- if [ "${PUSH_RESULTS_TO_DB}" == "true" ]; then
- flag="-r"
- fi
+ flags="-s"
+ [[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+=" -r"
echo "Functest: run $FUNCTEST_SUITE_NAME"
- cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME ${flag}"
+ cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME ${flags}"
container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
docker exec $container_id $cmd
- shell: |
#!/bin/bash
set +e
- flag=""
- if [ "${PUSH_RESULTS_TO_DB}" == "true" ]; then
- flag="-r"
- fi
- cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh ${flag}"
+ flags="-s"
+ [[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+=" -r"
+ cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh ${flags}"
container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
docker exec $container_id $cmd
- trigger:
name: 'joid-os-nosdn-nofeature-ha-intel-pod6-master-trigger'
triggers:
- - timed: '0 2 * * *'
+ - timed: '#0 2 * * *'
- trigger:
name: 'joid-os-nosdn-nofeature-ha-orange-pod2-master-trigger'
triggers:
- trigger:
name: 'joid-os-odl_l2-nofeature-ha-intel-pod6-master-trigger'
triggers:
- - timed: '0 10 * * *'
+ - timed: '#0 10 * * *'
- trigger:
name: 'joid-os-odl_l2-nofeature-ha-orange-pod2-master-trigger'
triggers:
- trigger:
name: 'joid-os-onos-nofeature-ha-intel-pod6-master-trigger'
triggers:
- - timed: '0 18 * * *'
+ - timed: '#0 18 * * *'
- trigger:
name: 'joid-os-onos-nofeature-ha-orange-pod2-master-trigger'
triggers:
projects:
- project-compare-type: 'REG_EXP'
#Left out arno projects oscar|octopus|functest|genesis
- project-pattern: 'vswitchperf|apex|availability|bottlenecks|compass4nfv|conductor|copper|doctor|dovetail|dpacc|escalator|fastpathmetrics|fuel|inspector|ipv6|joid|kvmfornfv|lsoapi|moon|movie|multisite|octopus|onosfw|ovsnfv|parser|prediction|promise|qtip|releng|rs|sdnvpn|sfc|vnf_forwarding_graph|enfv|pinpoint|pharos|cperf|functest|genesisreq'
+ project-pattern: 'vswitchperf|apex|availability|bottlenecks|compass4nfv|conductor|copper|doctor|dovetail|dpacc|escalator|fastpathmetrics|fuel|inspector|ipv6|joid|kvmfornfv|lsoapi|moon|movie|multisite|octopus|onosfw|ovsnfv|parser|prediction|promise|qtip|releng|rs|sdnvpn|sfc|vnf_forwarding_graph|enfv|pinpoint|pharos|cperf|functest|genesisreq|models'
branches:
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
comment-contains-value: 'remerge'
projects:
- project-compare-type: 'REG_EXP'
- project-pattern: 'vswitchperf|apex|availability|bottlenecks|compass4nfv|conductor|copper|doctor|dovetail|dpacc|escalator|fastpathmetrics|fuel|inspector|ipv6|joid|kvmfornfv|lsoapi|moon|movie|multisite|octopus|onosfw|ovsnfv|parser|prediction|promise|qtip|releng|rs|sdnvpn|sfc|vnf_forwarding_graph|enfv|pinpoint|pharos|cperf|functest|genesisreq'
+ project-pattern: 'vswitchperf|apex|availability|bottlenecks|compass4nfv|conductor|copper|doctor|dovetail|dpacc|escalator|fastpathmetrics|fuel|inspector|ipv6|joid|kvmfornfv|lsoapi|moon|movie|multisite|octopus|onosfw|ovsnfv|parser|prediction|promise|qtip|releng|rs|sdnvpn|sfc|vnf_forwarding_graph|enfv|pinpoint|pharos|cperf|functest|genesisreq|models'
branches:
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
suite: daily
auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
<<: *master
+ - huawei-us-deploy-bare-2:
+ installer: compass
+ suite: daily
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ <<: *master
- virtual:
installer: fuel
suite: daily
default: '-i 104.197.68.199:8086'
description: 'Arguments to use in order to choose the backend DB'
+- parameter:
+ name: 'yardstick-params-huawei-us-deploy-bare-2'
+ parameters:
+ - string:
+ name: YARDSTICK_DB_BACKEND
+ default: '-i 104.197.68.199:8086'
+ description: 'Arguments to use in order to choose the backend DB'
+
- parameter:
name: 'yardstick-params-zte-build-1'
parameters:
# install python packages
easy_install -U setuptools
- #python setup.py develop
+ easy_install -U pip
pip install -r ci/requirements.txt
pip install -e .
BUILD_DIR=${BUILD_DIR:-docs_build}
OUTPUT_DIR=${OUTPUT_DIR:-docs_output}
SRC_DIR=${SRC_DIR:-$BUILD_DIR/_src}
+VENV_DIR=${VENV_DIR:-$BUILD_DIR/_venv}
RELENG_DIR=${RELENG_DIR:-releng}
GERRIT_COMMENT=${GERRIT_COMMENT:-}
function check_rst_doc() {
_src="$1"
- if ! which doc8 > /dev/null ; then
- echo "Error: 'doc8' not found. Exec 'sudo pip install doc8' first."
- exit 1
- fi
# Note: This check may fail in many jobs for building project docs, since
# the old sample has lines more than 120. We ignore failures on this
# check right now, but these have to be fixed before OPNFV B release.
prepare_src_files
+if ! which virtualenv > /dev/null ; then
+ echo "Error: 'virtualenv' not found. Exec 'sudo pip install virtualenv' first."
+ exit 1
+fi
+
+virtualenv "$VENV_DIR"
+source "$VENV_DIR/bin/activate"
+pip install -r "$RELENG_DIR/docs/etc/requirements.txt"
+
find $DOCS_DIR -name $INDEX_RST -printf '%h\n' | while read dir
do
name=$(generate_name $dir)
fi
done
+
+deactivate
exit 1
fi
-if [[ $distro == Debian || $distro == Ubuntu ]]; then
+if [ -d /etc/monit/conf.d ]; then
monitconfdir="/etc/monit/conf.d/"
-elif [[ $distro == Fedora || $distro == CentOS || $distro == Redhat ]]; then
+elif [ -d /etc/monit.d ]; then
monitconfdir="/etc/monit.d"
+else
+ echo "Could not determine the location of the monit configuration file."
+ echo "Make sure monit is installed."
+ exit 1
fi
#make pid dir
#test for diff
if [[ "$(diff $monitconfdir/jenkins <(echo "\
check process jenkins with pidfile /var/run/$jenkinsuser/jenkins_jnlp_pid
-start program = \"usr/bin/sudo -u $jenkinsuser /bin/bash -c 'cd $dir; export started_monit=true; $0 $@'\"
-stop program = \" /bin/bash -c '/bin/kill \$(/bin/cat /var/run/$jenkinsuser/jenkins_jnlp_pid)'\"\
+start program = \"/usr/bin/sudo -u $jenkinsuser /bin/bash -c 'cd $dir; export started_monit=true; $0 $@'\"
+stop program = \"/bin/bash -c '/bin/kill \$(/bin/cat /var/run/$jenkinsuser/jenkins_jnlp_pid)'\"\
") )" ]]; then
echo "Updating monit config..."
makemonit $@
fi
fi
-if [[ run_in_foreground == true ]]; then
+if [[ $run_in_foreground == true ]]; then
$connectionstring
else
exec $connectionstring &
done
connectionstring="java -jar slave.jar -jnlpUrl https://build.opnfv.org/ci/computer/"$slave_name"/slave-agent.jnlp -secret "$slave_secret" -noCertificateCheck "
-distro="$(tr -s ' \011' '\012' < /etc/issue | head -n 1)"
main "$@"
--- /dev/null
+ <html>
+ <head>
+ <meta charset="utf-8">
+ <!-- Bootstrap core CSS -->
+ <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
+ <link href="default.css" rel="stylesheet">
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
+ <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function (){
+ $(".btn-more").click(function() {
+ $(this).hide();
+ $(this).parent().find(".panel-default").show();
+ });
+ })
+ </script>
+ </head>
+ <body>
+ <div class="container">
+ <div class="masthead">
+ <h3 class="text-muted">Functest status page</h3>
+ <nav>
+ <ul class="nav nav-justified">
+ <li class="active"><a href="index.html">Home</a></li>
+ <li><a href="index-status-apex.html">Apex</a></li>
+ <li><a href="index-status-compass.html">Compass</a></li>
+ <li><a href="index-status-fuel.html">Fuel</a></li>
+ <li><a href="index-status-joid.html">Joid</a></li>
+ </ul>
+ </nav>
+ </div>
+<div class="row">
+ <div class="col-md-1"></div>
+ <div class="col-md-10">
+ <div class="page-header">
+ <h2>{{installer}}</h2>
+ </div>
+
+ <div class="scenario-overview">
+ <div class="panel-heading"><h4><b>List of last scenarios run over the last 7 days </b></h4></div>
+ <table class="table">
+ <tr>
+ <th width="80%">Scenario</th>
+ <th width="20%">Iteration</th>
+ </tr>
+ {% for scenario,iteration in scenario_stats.iteritems() -%}
+ <tr class="tr-ok">
+ <td>{{scenario}}</td>
+ <td>{{iteration}}</td>
+ </tr>
+ {%- endfor %}
+ </table>
+ </div>
+
+
+
+ {% for scenario, iteration in scenario_stats.iteritems() -%}
+ <div class="scenario-part">
+ <div class="page-header">
+ <h3><span class="glyphicon glyphicon-chevron-right"> <b>{{scenario}}</b></h3>
+ </div>
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <span class="panel-header-item">
+ </span>
+ </div>
+ <table class="table">
+ <tr>
+ {% for test in items[scenario] -%}
+ <th>{{test.getName() }}</th>
+ {%- endfor %}
+ </tr>
+ <tr class="tr-weather-weather">
+ {% for test in items[scenario] -%}
+ {% if test.getCriteria() > 3 -%}
+ <td><img src="./img/weather-clear.png"></td>
+ {%- elif test.getCriteria() > 2 -%}
+ <td><img src="./img/weather-few-clouds.png"></td>
+ {%- elif test.getCriteria() > 1 -%}
+ <td><img src="./img/weather-overcast.png"></td>
+ {%- else -%}
+ <td><img src="./img/weather-storm.png"></td>
+ {%- endif %}
+ {%- endfor %}
+ </tr>
+ </table>
+ </div>
+ </div>
+ {%- endfor %}
+ </div>
+ <div class="col-md-1"></div>
+</div>
--- /dev/null
+ <html>
+ <head>
+ <meta charset="utf-8">
+ <!-- Bootstrap core CSS -->
+ <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
+ <link href="default.css" rel="stylesheet">
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
+ <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function (){
+ $(".btn-more").click(function() {
+ $(this).hide();
+ $(this).parent().find(".panel-default").show();
+ });
+ })
+ </script>
+ </head>
+ <body>
+ <div class="container">
+ <div class="masthead">
+ <h3 class="text-muted">Tempest status page</h3>
+ <nav>
+ <ul class="nav nav-justified">
+ <li class="active"><a href="index.html">Home</a></li>
+ <li><a href="index-tempest-apex.html">Apex</a></li>
+ <li><a href="index-tempest-compass.html">Compass</a></li>
+ <li><a href="index-tempest-fuel.html">Fuel</a></li>
+ <li><a href="index-tempest-joid.html">Joid</a></li>
+ </ul>
+ </nav>
+ </div>
+<div class="row">
+ <div class="col-md-1"></div>
+ <div class="col-md-10">
+ <div class="page-header">
+ <h2>{{installer}}</h2>
+ </div>
+ {% for scenario_name, results in scenario_results.iteritems() -%}
+ <div class="scenario-part">
+ <div class="page-header">
+ <h3><span class="glyphicon glyphicon-chevron-right"> <b>{{scenario_name}}</b></h3>
+ </div>
+ {% for result in results -%}
+ {% if loop.index > 2 -%}
+ <div class="panel panel-default" hidden>
+ {%- else -%}
+ <div class="panel panel-default">
+ {%- endif %}
+ <div class="panel-heading">
+ <div class="progress-bar" role="progressbar" aria-valuenow="{{result.pr_step_ok}}" aria-valuemin="0" aria-valuemax="100" style="width: {{result.pr_step_ok}}%"></div>
+ <span class="panel-header-item">
+ <h4><b>{{result.creation_date}}</b></h4>
+ </span>
+ <span class="badge panel-pod-name">{{result.pod_name}}</span>
+ </div>
+ <table class="table">
+ <tr>
+ <th width="20%">Item</th>
+ <th width="10%">Result</th>
+ <th width="10%">Status</th>
+ <th width="60%">Errors</th>
+ </tr>
+ {% for item in items -%}
+ {% if item in result.details.keys() -%}
+ {% if result.criteria[item] -%}
+ <tr class="tr-ok">
+ <td>{{item}}</td>
+ <td>{{result.details[item]}}</td>
+ <td><span class="glyphicon glyphicon-ok"></td>
+ <td>{{result.errors[item]}}</td>
+ </tr>
+ {%- else -%}
+ <tr class="tr-danger">
+ <td>{{item}}</td>
+ <td>{{result.details[item]}}</td>
+ <td><span class="glyphicon glyphicon-remove"></td>
+ <td>{{result.errors[item]}}</td>
+ </tr>
+ {%- endif %}
+ {%- endif %}
+ {%- endfor %}
+ </table>
+ </div>
+ {%- endfor %}
+ <button type="button" class="btn btn-more">More than two</button>
+ </div>
+ {%- endfor %}
+ </div>
+ <div class="col-md-1"></div>
+</div>
<h3 class="text-muted">vIMS status page</h3>
<nav>
<ul class="nav nav-justified">
- <li class="active"><a href="#">Home</a></li>
- <li><a href="index-fuel.html">Fuel</a></li>
- <li><a href="index-compass.html">Compass</a></li>
- <li><a href="index-joid.html">JOID</a></li>
- <li><a href="index-apex.html">APEX</a></li>
+ <li class="active"><a href="index.html">Home</a></li>
+ <li><a href="index-vims-fuel.html">Fuel</a></li>
+ <li><a href="index--vims-compass.html">Compass</a></li>
+ <li><a href="index-vims-joid.html">JOID</a></li>
+ <li><a href="index-vims-apex.html">APEX</a></li>
</ul>
</nav>
</div>
{%- endfor %}
</div>
<div class="col-md-1"></div>
-</div>
\ No newline at end of file
+</div>
--- /dev/null
+ <html>
+ <head>
+ <meta charset="utf-8">
+ <!-- Bootstrap core CSS -->
+ <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
+ <link href="default.css" rel="stylesheet">
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
+ <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function (){
+ $(".btn-more").click(function() {
+ $(this).hide();
+ $(this).parent().find(".panel-default").show();
+ });
+ })
+ </script>
+ </head>
+ <body>
+ <div class="container">
+ <div class="masthead">
+ <h3 class="text-muted">Functest reporting page</h3>
+ <nav>
+ <ul class="nav nav-justified">
+ <li class="active"><a href="#">Home</a></li>
+ <li><a href="./index-status-apex.html">Status</a></li>
+ <li><a href="./index-tempest-apex.html">Tempest</a></li>
+ <li><a href="./index-vims-apex.html">vIMS</a></li>
+ </ul>
+ </nav>
+ </div>
+<div class="row">
+ <div class="col-md-1"></div>
+ <div class="col-md-10">
+ <div class="page-main">
+ <h2>Functest</h2>
+ This project develops test suites that cover functionaling test cases in OPNFV.
+ <br>The test suites are integrated in the continuation integration (CI) framework and used to evaluate/validate scenario.
+ <br> Weekly meeting: every Tuesday 8 AM UTC
+ <br> IRC chan #opnfv-testperf
+
+ <br>
+ <h2>Useful Links</h2>
+ <li><a href="http://events.linuxfoundation.org/sites/events/files/slides/Functest%20in%20Depth_0.pdf">Functest in Depth</a></li>
+ <li><a href="https://git.opnfv.org/cgit/functest">Functest Repo</a></li>
+ <li><a href="https://wiki.opnfv.org/opnfv_functional_testing">Functest Project</a></li>
+ <li><a href="https://build.opnfv.org/ci/view/functest/">Functest Jenkins page</a></li>
+ <li><a href="https://jira.opnfv.org/secure/RapidBoard.jspa?rapidView=59&projectKey=FUNCTEST">JIRA</a></li>
+
+ </div>
+ </div>
+ <div class="col-md-1"></div>
+</div>
--- /dev/null
+from urllib2 import Request, urlopen, URLError
+import urllib2
+import json
+import jinja2
+import os
+import random
+
+
+class TestCase(object):
+ def __init__(self, name, project, criteria=-1):
+ self.name = name
+ self.project = project
+ self.criteria = criteria
+
+ def getName(self):
+ return self.name
+
+ def getProject(self):
+ return self.project
+
+ def getCriteria(self):
+ return self.criteria
+
+ def setCriteria(self, criteria):
+ self.criteria = criteria
+
+
+def getApiResults(case, installer):
+ case = case.getName()
+
+ # to remove proxy (to be removed at the end for local test only)
+ # proxy_handler = urllib2.ProxyHandler({})
+ # opener = urllib2.build_opener(proxy_handler)
+ # urllib2.install_opener(opener)
+ url = "http://testresults.opnfv.org/testapi/results?case=" + case + "&period=30&installer=" + installer
+ #url = "http://127.0.0.1:8000/results?case=" + case + "&period=30&installer=" + installer
+ request = Request(url)
+
+ try:
+ response = urlopen(request)
+ k = response.read()
+ results = json.loads(k)
+ except URLError, e:
+ print 'No kittez. Got an error code:', e
+
+ return results
+
+
+def getScenarios(case, installer):
+
+ results = getApiResults(case, installer)
+ test_results = results['test_results']
+
+ if test_results is not None:
+ test_results.reverse()
+
+ scenario_results = {}
+
+ for r in test_results:
+ # Retrieve all the scenarios per installer
+ if not r['version'] in scenario_results.keys():
+ scenario_results[r['version']] = []
+ scenario_results[r['version']].append(r)
+
+ return scenario_results
+
+
+def getScenarioStats(scenario_results):
+ scenario_stats = {}
+ for k, v in scenario_results.iteritems():
+ scenario_stats[k] = len(v)
+
+ return scenario_stats
+
+
+def getResult(testCase, installer):
+
+ # retrieve raw results
+ results = getApiResults(testCase, installer)
+ # let's concentrate on test results only
+ test_results = results['test_results']
+
+ # if results found, analyze them
+ if test_results is not None:
+ test_results.reverse()
+
+ scenario_results = {}
+
+ for r in test_results:
+ if not r['version'] in scenario_results.keys():
+ scenario_results[r['version']] = []
+ scenario_results[r['version']].append(r)
+
+ for s, s_result in scenario_results.items():
+ scenario_results[s] = s_result[0:5]
+ # For each scenario, we build a result object to deal with
+ # results, criteria and error handling
+ for result in scenario_results[s]:
+ result["creation_date"] = result["creation_date"].split(".")[0]
+
+ # Cannot be fully generic
+ # need to look for specific criteria case by case
+ # TODO add a criteria passed/failed in DB??
+ # TODO result["Success_criteria"] = result["success_criteria"]
+ # meanwhile just random....
+ # and consider the last random arbitrarily
+ # 4 levels for the results
+ # 3: 4+ consecutive runs passing the success criteria
+ # 2: <4 successful consecutive runs but passing the criteria
+ # 1: close to pass the success criteria
+ # 0: 0% success, not passing
+ #
+
+ return int(random.random()*4)+1
+
+# ******************************************************************************
+# ******************************************************************************
+# ******************************************************************************
+# ******************************************************************************
+# ******************************************************************************
+
+# as the criteria are all difference, we shall use a common way to indicate
+# the criteria
+# 100 = 100% = all the test must be OK
+# 90 = 90% = all the test must be above 90% of success rate
+# TODO harmonize success criteria
+# some criteria could be the duration, the success rate, the packet loss,...
+# to be done case by case
+# TODo create TestCriteria Object
+
+
+installers = ["apex", "compass", "fuel", "joid"]
+# init just tempest to get the scenario as all the scenarios run Temepst
+tempest = TestCase("Tempest", "functest", -1)
+
+for installer in installers:
+
+ scenario_results = getScenarios(tempest, installer)
+ scenario_stats = getScenarioStats(scenario_results)
+
+ items = {}
+
+ for s, s_result in scenario_results.items():
+
+ vPing = TestCase("vPing", "functest")
+ vPing_userdata = TestCase("vPing_userdata", "functest")
+ tempest = TestCase("Tempest", "functest")
+ rally = TestCase("Rally", "functest")
+ odl = TestCase("ODL", "functest")
+ onos = TestCase("ONOS", "functest")
+ ovno = TestCase("OVNO", "functest")
+ vIMS = TestCase("vIMS", "functest")
+ doctor = TestCase("doctor-notification", "doctor")
+ promise = TestCase("promise", "promise")
+ odl_vpn = TestCase("ODL VPN Service tests", "sdnvpn")
+ bgpvpn_api = TestCase("OpenStack Neutron BGPVPN API extension tests",
+ "sdnvpn")
+ testCases = [vPing, vPing_userdata, tempest, rally, odl, onos, vIMS,
+ doctor, promise]
+
+ for testCase in testCases:
+ result = getResult(testCase, installer)
+ testCase.setCriteria(result)
+ # print "case %s (%s) = %s " % (testCase.getName(), s, result)
+ items[s] = testCases
+
+ templateLoader = jinja2.FileSystemLoader(os.path.dirname(os.path.abspath(__file__)))
+ templateEnv = jinja2.Environment(loader=templateLoader)
+
+ TEMPLATE_FILE = "index-status-tmpl.html"
+ template = templateEnv.get_template(TEMPLATE_FILE)
+
+ outputText = template.render(scenario_stats=scenario_stats,
+ items=items,
+ installer=installer)
+
+ with open("index-status-" + installer + ".html", "wb") as fh:
+ fh.write(outputText)
--- /dev/null
+from urllib2 import Request, urlopen, URLError
+import json
+import jinja2
+import os
+
+installers = ["apex", "compass", "fuel", "joid"]
+items = ["tests", "Success rate", "duration"]
+
+for installer in installers:
+ # we consider the Tempest results of the last 7 days
+ url = "http://testresults.opnfv.org/testapi/results?case=Tempest"
+ request = Request(url + '&period=7&installer=' + installer)
+
+ try:
+ response = urlopen(request)
+ k = response.read()
+ results = json.loads(k)
+ except URLError, e:
+ print 'No kittez. Got an error code:', e
+
+ test_results = results['test_results']
+ test_results.reverse()
+
+ scenario_results = {}
+ criteria = {}
+ errors = {}
+
+ for r in test_results:
+ # Retrieve all the scenarios per installer
+ if not r['version'] in scenario_results.keys():
+ scenario_results[r['version']] = []
+ scenario_results[r['version']].append(r)
+
+ for s, s_result in scenario_results.items():
+ scenario_results[s] = s_result[0:5]
+ # For each scenario, we build a result object to deal with
+ # results, criteria and error handling
+ for result in scenario_results[s]:
+ result["creation_date"] = result["creation_date"].split(".")[0]
+
+ # retrieve results
+ # ****************
+ nb_tests_run = result['details']['tests']
+ if nb_tests_run != 0:
+ success_rate = 100*(int(result['details']['tests']) - int(result['details']['failures']))/int(result['details']['tests'])
+ else:
+ success_rate = 0
+
+ result['details']["tests"] = nb_tests_run
+ result['details']["Success rate"] = str(success_rate) + "%"
+
+ # Criteria management
+ # *******************
+ crit_tests = False
+ crit_rate = False
+ crit_time = False
+
+ # Expect that at least 200 tests are run
+ if nb_tests_run >= 200:
+ crit_tests = True
+
+ # Expect that at least 90% of success
+ if success_rate >= 90:
+ crit_rate = True
+
+ # Expect that the suite duration is inferior to 45m
+ if result['details']['duration'] < 2700:
+ crit_time = True
+
+ result['criteria'] = {'tests': crit_tests,
+ 'Success rate': crit_rate,
+ 'duration': crit_time}
+
+ # error management
+ # ****************
+
+ # TODO get information from artefact based on build tag
+ # to identify errors of the associated run
+ # build tag needed to wget errors on the artifacts
+ # the idea is to list the tests in errors and provide the link
+ # towards complete artifact
+ # another option will be to put the errors in the DB
+ # (in the detail section)...
+ result['errors'] = {'tests': "",
+ 'Success rate': "",
+ 'duration': ""}
+
+ templateLoader = jinja2.FileSystemLoader(os.path.dirname(os.path.abspath(__file__)))
+ templateEnv = jinja2.Environment(loader=templateLoader)
+
+ TEMPLATE_FILE = "index-tempest-tmpl.html"
+ template = templateEnv.get_template(TEMPLATE_FILE)
+
+ outputText = template.render(scenario_results=scenario_results,
+ items=items,
+ installer=installer)
+
+ with open("index-tempest-" + installer + ".html", "wb") as fh:
+ fh.write(outputText)
for result in scenario_results[s]:
result["creation_date"] = result["creation_date"].split(".")[0]
sig_test = result['details']['sig_test']['result']
- if not sig_test == "":
+ if not sig_test == "" and isinstance(sig_test, list):
format_result = sig_test_format(sig_test)
if format_result['failures'] > format_result['passed']:
result['details']['sig_test']['duration'] = 0
templateLoader = jinja2.FileSystemLoader(os.path.dirname(os.path.abspath(__file__)))
templateEnv = jinja2.Environment( loader=templateLoader )
- TEMPLATE_FILE = "index-tmpl.html"
+ TEMPLATE_FILE = "index-vims-tmpl.html"
template = templateEnv.get_template( TEMPLATE_FILE )
outputText = template.render( scenario_results = scenario_results, step_order = step_order, installer = installer)
- with open("index-" + installer + ".html", "wb") as fh:
+ with open("index-vims" + installer + ".html", "wb") as fh:
fh.write(outputText)
- installer (fuel, ...)
- build_tag : Jenkins build tag name
- period : x (x last days)
+ - scenario : the test scenario (previously version)
+ - criteria : the global criteria status passed or failed
:param result_id: Get a result by ID
version_arg = self.get_query_argument("version", None)
installer_arg = self.get_query_argument("installer", None)
build_tag_arg = self.get_query_argument("build_tag", None)
+ scenario_arg = self.get_query_argument("scenario", None)
+ criteria_arg = self.get_query_argument("criteria", None)
period_arg = self.get_query_argument("period", None)
# prepare request
if build_tag_arg is not None:
get_request["build_tag"] = build_tag_arg
+ if scenario_arg is not None:
+ get_request["scenario"] = scenario_arg
+
+ if criteria_arg is not None:
+ get_request["criteria_tag"] = criteria_arg
+
if period_arg is not None:
try:
period_arg = int(period_arg)
self.creation_date = None\r
self.details = None\r
self.build_tag = None\r
+ self.scenario = None\r
+ self.criteria = None\r
\r
@staticmethod\r
def test_result_from_dict(test_result_dict):\r
t.version = test_result_dict.get('version')\r
t.installer = test_result_dict.get('installer')\r
t.build_tag = test_result_dict.get('build_tag')\r
+ t.scenario = test_result_dict.get('scenario')\r
+ t.criteria = test_result_dict.get('criteria')\r
\r
return t\r
\r
"version": self.version,\r
"installer": self.installer,\r
"details": self.details,\r
- "build_tag": self.build_tag\r
+ "build_tag": self.build_tag,\r
+ "scenario": self.scenario,\r
+ "criteria": self.criteria\r
}\r
\r
def format_http(self):\r
"version": self.version,\r
"installer": self.installer,\r
"details": self.details,\r
- "build_tag": self.build_tag\r
+ "build_tag": self.build_tag,\r
+ "scenario": self.scenario,\r
+ "criteria": self.criteria\r
}\r
\r