summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jjb/armband/armband-ci-jobs.yml20
-rw-r--r--jjb/bottlenecks/bottlenecks-project-jobs.yml30
-rw-r--r--jjb/doctor/doctor.yml27
-rw-r--r--jjb/functest/functest-ci-jobs.yml5
-rw-r--r--utils/test/reporting/yardstick/img/gauge_0.pngbin0 -> 3644 bytes
-rw-r--r--utils/test/reporting/yardstick/img/gauge_100.pngbin0 -> 3191 bytes
-rw-r--r--utils/test/reporting/yardstick/img/gauge_16.7.pngbin0 -> 3170 bytes
-rw-r--r--utils/test/reporting/yardstick/img/gauge_25.pngbin0 -> 3108 bytes
-rw-r--r--utils/test/reporting/yardstick/img/gauge_33.3.pngbin0 -> 3081 bytes
-rw-r--r--utils/test/reporting/yardstick/img/gauge_41.7.pngbin0 -> 3169 bytes
-rw-r--r--utils/test/reporting/yardstick/img/gauge_50.pngbin0 -> 3123 bytes
-rw-r--r--utils/test/reporting/yardstick/img/gauge_58.3.pngbin0 -> 3161 bytes
-rw-r--r--utils/test/reporting/yardstick/img/gauge_66.7.pngbin0 -> 3069 bytes
-rw-r--r--utils/test/reporting/yardstick/img/gauge_75.pngbin0 -> 3030 bytes
-rw-r--r--utils/test/reporting/yardstick/img/gauge_8.3.pngbin0 -> 2993 bytes
-rw-r--r--utils/test/reporting/yardstick/img/gauge_83.3.pngbin0 -> 3122 bytes
-rw-r--r--utils/test/reporting/yardstick/img/gauge_91.7.pngbin0 -> 3008 bytes
-rw-r--r--utils/test/reporting/yardstick/reporting-status.py32
-rw-r--r--utils/test/reporting/yardstick/reportingConf.py4
-rw-r--r--utils/test/reporting/yardstick/reportingUtils.py48
-rw-r--r--utils/test/reporting/yardstick/scenarioResult.py12
-rw-r--r--utils/test/reporting/yardstick/template/index-status-tmpl.html14
22 files changed, 126 insertions, 66 deletions
diff --git a/jjb/armband/armband-ci-jobs.yml b/jjb/armband/armband-ci-jobs.yml
index 25987328d..f6b48656a 100644
--- a/jjb/armband/armband-ci-jobs.yml
+++ b/jjb/armband/armband-ci-jobs.yml
@@ -228,46 +228,46 @@
- trigger:
name: 'fuel-os-odl_l2-nofeature-ha-armband-baremetal-master-trigger'
triggers:
- - timed: '0 3,15 * * 1'
+ - timed: '0 0 * * 1'
- trigger:
name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-master-trigger'
triggers:
- - timed: '0 3,15 * * 2'
+ - timed: '0 0 * * 2'
- trigger:
name: 'fuel-os-odl_l3-nofeature-ha-armband-baremetal-master-trigger'
triggers:
- - timed: '0 3,15 * * 3'
+ - timed: '0 0 * * 3'
- trigger:
name: 'fuel-os-odl_l2-bgpvpn-ha-armband-baremetal-master-trigger'
triggers:
- - timed: '0 3,15 * * 4'
+ - timed: '0 0 * * 4'
- trigger:
name: 'fuel-os-odl_l2-nofeature-noha-armband-baremetal-master-trigger'
triggers:
- - timed: '0 3,15 * * 5'
+ - timed: '0 0 * * 5'
#----------------------------------------------------------------------
# Enea Armband CI Baremetal Triggers running against colorado branch
#----------------------------------------------------------------------
- trigger:
name: 'fuel-os-odl_l2-nofeature-ha-armband-baremetal-colorado-trigger'
triggers:
- - timed: '0 4,16 * * 1'
+ - timed: '0 4 * * *'
- trigger:
name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-colorado-trigger'
triggers:
- - timed: '0 4,16 * * 2'
+ - timed: '0 8 * * *'
- trigger:
name: 'fuel-os-odl_l3-nofeature-ha-armband-baremetal-colorado-trigger'
triggers:
- - timed: '0 4,16 * * 3'
+ - timed: '0 12 * * *'
- trigger:
name: 'fuel-os-odl_l2-bgpvpn-ha-armband-baremetal-colorado-trigger'
triggers:
- - timed: '0 4,16 * * 4'
+ - timed: '0 16 * * *'
- trigger:
name: 'fuel-os-odl_l2-nofeature-noha-armband-baremetal-colorado-trigger'
triggers:
- - timed: '0 4,16 * * 5'
+ - timed: '0 20 * * *'
#---------------------------------------------------------------
# Enea Armband CI Virtual Triggers running against master branch
#---------------------------------------------------------------
diff --git a/jjb/bottlenecks/bottlenecks-project-jobs.yml b/jjb/bottlenecks/bottlenecks-project-jobs.yml
index fffc22def..ca2fa40f7 100644
--- a/jjb/bottlenecks/bottlenecks-project-jobs.yml
+++ b/jjb/bottlenecks/bottlenecks-project-jobs.yml
@@ -71,9 +71,7 @@
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
builders:
- - shell: |
- echo "bottlenecks: verify job"
- #TO DO: this should be changed when the unittest ready
+ - bottlenecks-unit-tests
- job-template:
name: 'bottlenecks-merge-{stream}'
@@ -107,8 +105,7 @@
branch-pattern: '**/{branch}'
builders:
- - shell: |
- echo "bottlenecks: merge"
+ - bottlenecks-unit-tests
- job-template:
name: 'bottlenecks-{suite}-upload-artifacts-{stream}'
@@ -195,3 +192,26 @@
echo "Bottlenecks: cleanup cache used for storage downloaded packages"
/bin/rm -rf $CACHE_DIR
+
+- builder:
+ name: bottlenecks-unit-tests
+ builders:
+ - shell: |
+ #!/bin/bash
+ set -o errexit
+ set -o pipefail
+
+ echo "Running unit tests..."
+ cd $WORKSPACE
+ virtualenv $WORKSPACE/bottlenecks_venv
+ source $WORKSPACE/bottlenecks_venv/bin/activate
+
+ # install python packages
+ easy_install -U setuptools
+ easy_install -U pip
+ pip install -r requirements.txt
+
+ # unit tests
+ ./tests.sh
+
+ deactivate
diff --git a/jjb/doctor/doctor.yml b/jjb/doctor/doctor.yml
index b53082eb5..fcbd1b0e7 100644
--- a/jjb/doctor/doctor.yml
+++ b/jjb/doctor/doctor.yml
@@ -83,27 +83,9 @@
default: '{inspector}'
description: 'Doctor inspector type to be used'
- string:
- name: INSTALLER_TYPE
- default: apex
- description: 'OPNFV Installer type'
- - string:
name: OS_CREDS
default: /home/jenkins/openstack.creds
description: 'OpenStack credentials'
- - '{installer}-defaults'
- - '{slave-label}-defaults'
- - 'functest-suite-parameter':
- FUNCTEST_SUITE_NAME: '{project}'
- TESTCASE_OPTIONS: '-e INSPECTOR_TYPE={inspector} -v $WORKSPACE:$HOME/opnfv/repos/{project}'
- - string:
- name: DEPLOY_SCENARIO
- default: 'os-odl_l2-nofeature-ha'
- - string:
- name: DOCKER_TAG
- default: '{docker_tag}'
- description: 'Tag to pull docker image'
- - functest-parameter:
- gs-pathname: '{gs-pathname}'
scm:
- gerrit-trigger-scm:
@@ -139,4 +121,11 @@
notbuilt: true
builders:
- - 'functest-suite-builder'
+ - trigger-builds:
+ - project: 'functest-{installer}-virtual-suite-{stream}'
+ current-parameters: true
+ predefined-parameters: |
+ FUNCTEST_SUITE_NAME=doctor
+ TESTCASE_OPTIONS='-e INSPECTOR_TYPE=$INSPECTOR_TYPE -v $WORKSPACE:$HOME/opnfv/repos/doctor'
+ block: true
+ same-node: true
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index d5b99b2a3..4747835b1 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -168,6 +168,11 @@
slave-label: '{pod}'
installer: fuel
<<: *colorado
+# PODs for verify jobs triggered by each patch upload
+ - ool-virtual1:
+ slave-label: '{pod}'
+ installer: apex
+ <<: *master
#--------------------------------
testsuite:
diff --git a/utils/test/reporting/yardstick/img/gauge_0.png b/utils/test/reporting/yardstick/img/gauge_0.png
new file mode 100644
index 000000000..ecefc0e66
--- /dev/null
+++ b/utils/test/reporting/yardstick/img/gauge_0.png
Binary files differ
diff --git a/utils/test/reporting/yardstick/img/gauge_100.png b/utils/test/reporting/yardstick/img/gauge_100.png
new file mode 100644
index 000000000..e199e1561
--- /dev/null
+++ b/utils/test/reporting/yardstick/img/gauge_100.png
Binary files differ
diff --git a/utils/test/reporting/yardstick/img/gauge_16.7.png b/utils/test/reporting/yardstick/img/gauge_16.7.png
new file mode 100644
index 000000000..3e3993c3b
--- /dev/null
+++ b/utils/test/reporting/yardstick/img/gauge_16.7.png
Binary files differ
diff --git a/utils/test/reporting/yardstick/img/gauge_25.png b/utils/test/reporting/yardstick/img/gauge_25.png
new file mode 100644
index 000000000..4923659b9
--- /dev/null
+++ b/utils/test/reporting/yardstick/img/gauge_25.png
Binary files differ
diff --git a/utils/test/reporting/yardstick/img/gauge_33.3.png b/utils/test/reporting/yardstick/img/gauge_33.3.png
new file mode 100644
index 000000000..364574b4a
--- /dev/null
+++ b/utils/test/reporting/yardstick/img/gauge_33.3.png
Binary files differ
diff --git a/utils/test/reporting/yardstick/img/gauge_41.7.png b/utils/test/reporting/yardstick/img/gauge_41.7.png
new file mode 100644
index 000000000..8c3e910fa
--- /dev/null
+++ b/utils/test/reporting/yardstick/img/gauge_41.7.png
Binary files differ
diff --git a/utils/test/reporting/yardstick/img/gauge_50.png b/utils/test/reporting/yardstick/img/gauge_50.png
new file mode 100644
index 000000000..2874b9fcf
--- /dev/null
+++ b/utils/test/reporting/yardstick/img/gauge_50.png
Binary files differ
diff --git a/utils/test/reporting/yardstick/img/gauge_58.3.png b/utils/test/reporting/yardstick/img/gauge_58.3.png
new file mode 100644
index 000000000..beedc8aa9
--- /dev/null
+++ b/utils/test/reporting/yardstick/img/gauge_58.3.png
Binary files differ
diff --git a/utils/test/reporting/yardstick/img/gauge_66.7.png b/utils/test/reporting/yardstick/img/gauge_66.7.png
new file mode 100644
index 000000000..93f44d133
--- /dev/null
+++ b/utils/test/reporting/yardstick/img/gauge_66.7.png
Binary files differ
diff --git a/utils/test/reporting/yardstick/img/gauge_75.png b/utils/test/reporting/yardstick/img/gauge_75.png
new file mode 100644
index 000000000..9fc261ff8
--- /dev/null
+++ b/utils/test/reporting/yardstick/img/gauge_75.png
Binary files differ
diff --git a/utils/test/reporting/yardstick/img/gauge_8.3.png b/utils/test/reporting/yardstick/img/gauge_8.3.png
new file mode 100644
index 000000000..59f86571e
--- /dev/null
+++ b/utils/test/reporting/yardstick/img/gauge_8.3.png
Binary files differ
diff --git a/utils/test/reporting/yardstick/img/gauge_83.3.png b/utils/test/reporting/yardstick/img/gauge_83.3.png
new file mode 100644
index 000000000..27ae4ec54
--- /dev/null
+++ b/utils/test/reporting/yardstick/img/gauge_83.3.png
Binary files differ
diff --git a/utils/test/reporting/yardstick/img/gauge_91.7.png b/utils/test/reporting/yardstick/img/gauge_91.7.png
new file mode 100644
index 000000000..280865714
--- /dev/null
+++ b/utils/test/reporting/yardstick/img/gauge_91.7.png
Binary files differ
diff --git a/utils/test/reporting/yardstick/reporting-status.py b/utils/test/reporting/yardstick/reporting-status.py
index 57a95947b..345acef42 100644
--- a/utils/test/reporting/yardstick/reporting-status.py
+++ b/utils/test/reporting/yardstick/reporting-status.py
@@ -26,6 +26,7 @@ logger.info("* Data retention = %s days *" % conf.PERIOD)
logger.info("* *")
logger.info("*******************************************")
+
# For all the versions
for version in conf.versions:
# For all the installers
@@ -38,8 +39,6 @@ for version in conf.versions:
if not scenario_results.has_key(k):
scenario_results[k] = []
scenario_results[k] += stable_result[k]
- for k,v in scenario_results.items():
- scenario_results[k] = v[0:conf.LASTEST_TESTS]
scenario_result_criteria = {}
# From each scenarios get results list
@@ -47,23 +46,26 @@ for version in conf.versions:
logger.info("---------------------------------")
logger.info("installer %s, version %s, scenario %s:" % (installer, version, s))
- s_status = 'KO'
- scenario_criteria = len(s_result)
- scenario_score = 0
-
+ ten_criteria = len(s_result)
+ ten_score = 0
for v in s_result:
- if v['criteria'] == 'SUCCESS':
- scenario_score += 1
+ ten_score += v
- if scenario_score == scenario_criteria and scenario_criteria == 4:
- s_status = 'OK'
- logger.info(">>>>> scenario OK, save the information")
- else:
- logger.info(">>>> scenario not OK, score = %s/%s" % (scenario_score, scenario_criteria))
+ four_result = s_result[:conf.LASTEST_TESTS]
+ four_criteria = len(four_result)
+ four_score = 0
+ for v in four_result:
+ four_score += v
- s_score = str(scenario_score) + '/' + str(scenario_criteria)
- scenario_result_criteria[s] = sr.ScenarioResult(s_status, s_score)
+ s_status = str(utils.get_status(four_result, s_result))
+ s_four_score = str(four_score) + '/' + str(four_criteria)
+ s_ten_score = str(ten_score) + '/' + str(ten_criteria)
+ scenario_result_criteria[s] = sr.ScenarioResult(s_status, s_four_score, s_ten_score)
+ if '100' == s_status:
+ logger.info(">>>>> scenario OK, save the information")
+ else:
+ logger.info(">>>> scenario not OK, last 4 iterations = %s, last 10 days = %s" % (s_four_score, s_ten_score))
logger.info("--------------------------")
templateLoader = jinja2.FileSystemLoader(conf.REPORTING_PATH)
diff --git a/utils/test/reporting/yardstick/reportingConf.py b/utils/test/reporting/yardstick/reportingConf.py
index 447b428a8..52d999740 100644
--- a/utils/test/reporting/yardstick/reportingConf.py
+++ b/utils/test/reporting/yardstick/reportingConf.py
@@ -13,8 +13,8 @@ installers = ["apex", "compass", "fuel", "joid"]
versions = ["master", "colorado"]
-# get data in the past 7 days
-PERIOD = 7
+# get data in the past 10 days
+PERIOD = 10
# get the lastest 4 test results to determinate the success criteria
LASTEST_TESTS = 4
diff --git a/utils/test/reporting/yardstick/reportingUtils.py b/utils/test/reporting/yardstick/reportingUtils.py
index 06bcd4926..71eb9196c 100644
--- a/utils/test/reporting/yardstick/reportingUtils.py
+++ b/utils/test/reporting/yardstick/reportingUtils.py
@@ -45,17 +45,59 @@ def getScenarioStatus(installer, version):
print 'Got an error code:', e
scenario_results = {}
+ result_dict = {}
if test_results is not None:
for r in test_results:
- if r['stop_date'] != 'None':
+ if r['stop_date'] != 'None' and r['criteria'] is not None:
if not r['scenario'] in scenario_results.keys():
scenario_results[r['scenario']] = []
scenario_results[r['scenario']].append(r)
for k,v in scenario_results.items():
- scenario_results[k] = v[:conf.LASTEST_TESTS]
+ # scenario_results[k] = v[:conf.LASTEST_TESTS]
+ s_list = []
+ for element in v:
+ if element['criteria'] == 'SUCCESS':
+ s_list.append(1)
+ else:
+ s_list.append(0)
+ result_dict[k] = s_list
- return scenario_results
+ # return scenario_results
+ return result_dict
+
+def subfind(given_list, pattern_list):
+ for i in range(len(given_list)):
+ if given_list[i] == pattern_list[0] and given_list[i:i + conf.LASTEST_TESTS] == pattern_list:
+ return True
+ return False
+
+def get_percent(status):
+
+ if status * 100 % 6:
+ return round(float(status) * 100 / 6, 1)
+ else:
+ return status * 100 / 6
+
+def get_status(four_list, ten_list):
+ four_score = 0
+ ten_score = 0
+
+ for v in four_list:
+ four_score += v
+ for v in ten_list:
+ ten_score += v
+
+ if four_score == conf.LASTEST_TESTS:
+ status = 6
+ elif subfind(ten_list, [1, 1, 1, 1]):
+ status = 5
+ elif ten_score == 0:
+ status = 0
+ else:
+ status = four_score + 1
+
+ return get_percent(status)
def _test():
diff --git a/utils/test/reporting/yardstick/scenarioResult.py b/utils/test/reporting/yardstick/scenarioResult.py
index 743346adc..61ffb2ce7 100644
--- a/utils/test/reporting/yardstick/scenarioResult.py
+++ b/utils/test/reporting/yardstick/scenarioResult.py
@@ -9,12 +9,16 @@
class ScenarioResult(object):
- def __init__(self, status, score=0):
+ def __init__(self, status, four_days_score='', ten_days_score=''):
self.status = status
- self.score = score
+ self.four_days_score = four_days_score
+ self.ten_days_score = ten_days_score
def getStatus(self):
return self.status
- def getScore(self):
- return self.score
+ def getTenDaysScore(self):
+ return self.ten_days_score
+
+ def getFourDaysScore(self):
+ return self.four_days_score
diff --git a/utils/test/reporting/yardstick/template/index-status-tmpl.html b/utils/test/reporting/yardstick/template/index-status-tmpl.html
index ff1a619f1..602ce8a74 100644
--- a/utils/test/reporting/yardstick/template/index-status-tmpl.html
+++ b/utils/test/reporting/yardstick/template/index-status-tmpl.html
@@ -40,21 +40,19 @@
<div class="panel-heading"><h4><b>List of last scenarios ({{version}}) run over the last {{period}} days </b></h4></div>
<table class="table">
<tr>
- <th width="60%">Scenario</th>
+ <th width="40%">Scenario</th>
<th width="20%">Status</th>
- <th width="20%">Score</th>
+ <th width="20%">Last 4 Iterations</th>
+ <th width="20%">Last 10 Days</th>
</tr>
{% for scenario,result in scenario_results.iteritems() -%}
<tr class="tr-ok">
<td>{{scenario}}</td>
<td>
- {%if scenario_results[scenario].getStatus() is sameas "OK" -%}
- <img src="../../img/icon-ok.png">
- {%- else -%}
- <img src="../../img/icon-nok.png">
- {%- endif %}
+ <img src="../../img/gauge_{{ scenario_results[scenario].getStatus() }}.png">
</td>
- <td>{{scenario_results[scenario].getScore()}}</td>
+ <td>{{scenario_results[scenario].getFourDaysScore()}}</td>
+ <td>{{scenario_results[scenario].getTenDaysScore()}}</td>
</tr>
{%- endfor %}
</table>