diff options
-rw-r--r-- | jjb/apex/apex.yml | 15 | ||||
-rwxr-xr-x | jjb/fuel/fuel-build.sh | 12 | ||||
-rw-r--r-- | jjb/fuel/fuel-ci-jobs.yml | 16 | ||||
-rwxr-xr-x | jjb/fuel/fuel-project-jobs.yml | 3 | ||||
-rw-r--r-- | jjb/joid/joid-deploy.sh | 2 | ||||
-rw-r--r-- | jjb/opnfv/slave-params.yml | 4 | ||||
-rw-r--r-- | jjb/qtip/qtip-ci-jobs.yml | 2 | ||||
-rw-r--r-- | utils/test/reporting/functest/img/icon-nok.png | bin | 0 -> 2317 bytes | |||
-rw-r--r-- | utils/test/reporting/functest/img/icon-ok.png | bin | 0 -> 4063 bytes | |||
-rw-r--r-- | utils/test/reporting/functest/reporting-status.py | 66 | ||||
-rw-r--r-- | utils/test/reporting/functest/template/index-status-tmpl.html | 13 |
11 files changed, 99 insertions, 34 deletions
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index fc0fd4bf9..0ef6831e7 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -216,7 +216,7 @@ - trigger-builds: - project: 'apex-deploy-virtual-os-nosdn-nofeature-ha-{stream1}' predefined-parameters: | - BUILD_DIRECTORY=apex-verify-{stream1}/build_output + BUILD_DIRECTORY=apex-verify-{stream1} OPNFV_CLEAN=yes git-revision: false block: true @@ -226,6 +226,13 @@ # DEPLOY_SCENARIO=os-nosdn-nofeature-ha # FUNCTEST_SUITE_NAME=vping_userdata # block: true + - trigger-builds: + - project: 'apex-deploy-virtual-os-odl_l2-nofeature-ha-{stream1}' + predefined-parameters: | + BUILD_DIRECTORY=apex-verify-{stream1} + OPNFV_CLEAN=yes + git-revision: false + block: true - 'apex-workspace-cleanup' - job-template: @@ -329,7 +336,7 @@ - trigger-builds: - project: 'apex-deploy-virtual-os-nosdn-nofeature-ha-{stream}' predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream}/build_output + BUILD_DIRECTORY=apex-build-{stream} OPNFV_CLEAN=yes git-revision: false block: true @@ -892,7 +899,7 @@ # 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_CMD="CONFIG=${WORKSPACE}/build RESOURCES=${WORKSPACE}/build/images/ ./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" # Make sure python34 is installed @@ -941,7 +948,7 @@ if [ "$OPNFV_CLEAN" == 'yes' ]; then if [[ $BUILD_DIRECTORY == *verify-master* ]]; then - sudo ./clean.sh + sudo CONFIG=../lib ./clean.sh else sudo opnfv-clean fi diff --git a/jjb/fuel/fuel-build.sh b/jjb/fuel/fuel-build.sh index eaf1f83e7..95ebaa5a9 100755 --- a/jjb/fuel/fuel-build.sh +++ b/jjb/fuel/fuel-build.sh @@ -35,11 +35,13 @@ CURRENT_SHA1=$(git rev-parse HEAD) FORCE_BUILD=${FORCE_BUILD:-false} if [[ "$CURRENT_SHA1" == "$LATEST_ISO_SHA1" && "$FORCE_BUILD" == "false" ]]; then - echo "An ISO has already been built for this commit" - echo " $LATEST_ISO_URL" - echo "Nothing new to build. Exiting." - touch $WORKSPACE/.noupload - exit 0 + echo "***************************************************" + echo " An ISO has already been built for this commit" + echo " $LATEST_ISO_URL" + echo "***************************************************" +# echo "Nothing new to build. Exiting." +# touch $WORKSPACE/.noupload +# exit 0 else echo "This commit has not been built yet or forced build! Proceeding with the build." /bin/rm -f $LATEST_ISO_PROPERTIES diff --git a/jjb/fuel/fuel-ci-jobs.yml b/jjb/fuel/fuel-ci-jobs.yml index e1816b528..77b711e74 100644 --- a/jjb/fuel/fuel-ci-jobs.yml +++ b/jjb/fuel/fuel-ci-jobs.yml @@ -278,35 +278,35 @@ - trigger: name: 'fuel-os-nosdn-nofeature-ha-ericsson-pod2-brahmaputra-trigger' triggers: - - timed: '0 12 * * *' + - timed: '' - trigger: name: 'fuel-os-odl_l2-nofeature-ha-ericsson-pod2-brahmaputra-trigger' triggers: - - timed: '0 15 * * *' + - timed: '' - trigger: name: 'fuel-os-odl_l3-nofeature-ha-ericsson-pod2-brahmaputra-trigger' triggers: - - timed: '0 18 * * *' + - timed: '' - trigger: name: 'fuel-os-onos-nofeature-ha-ericsson-pod2-brahmaputra-trigger' triggers: - - timed: '0 21 * * *' + - timed: '' - trigger: name: 'fuel-os-odl_l2-bgpvpn-ha-ericsson-pod2-brahmaputra-trigger' triggers: - - timed: '0 0 * * *' + - timed: '' - trigger: name: 'fuel-os-odl_l2-sfc-ha-ericsson-pod2-brahmaputra-trigger' triggers: - - timed: '0 3 * * *' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm-ha-ericsson-pod2-brahmaputra-trigger' triggers: - - timed: '0 6 * * *' + - timed: '' - trigger: name: 'fuel-os-nosdn-ovs-ha-ericsson-pod2-brahmaputra-trigger' triggers: - - timed: '0 9 * * *' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm-noha-ericsson-pod2-brahmaputra-trigger' triggers: diff --git a/jjb/fuel/fuel-project-jobs.yml b/jjb/fuel/fuel-project-jobs.yml index 0d768203f..f377c9bed 100755 --- a/jjb/fuel/fuel-project-jobs.yml +++ b/jjb/fuel/fuel-project-jobs.yml @@ -60,8 +60,7 @@ branch: '{branch}' triggers: - - pollscm: - cron: '0 H/4 * * *' + - timed: '0 H/4 * * *' wrappers: - timeout: diff --git a/jjb/joid/joid-deploy.sh b/jjb/joid/joid-deploy.sh index 59ba01588..149447733 100644 --- a/jjb/joid/joid-deploy.sh +++ b/jjb/joid/joid-deploy.sh @@ -50,8 +50,6 @@ fi case $NODE_NAME in orange-fr-pod2) POD=orange-pod2 ;; - juniper-us-test-1) - POD=juniper-pod1 ;; *virtual*) POD=default ;; *) diff --git a/jjb/opnfv/slave-params.yml b/jjb/opnfv/slave-params.yml index d70cd04d3..5892e7c96 100644 --- a/jjb/opnfv/slave-params.yml +++ b/jjb/opnfv/slave-params.yml @@ -415,9 +415,9 @@ name: SLAVE_NAME description: 'Slave name on Jenkins' allowed-slaves: - - juniper-us-test-1 + - juniper-pod1 default-slaves: - - juniper-us-test-1 + - juniper-pod1 - string: name: INSTALLER_VERSION default: latest diff --git a/jjb/qtip/qtip-ci-jobs.yml b/jjb/qtip/qtip-ci-jobs.yml index 121a8e4a1..44bdd7138 100644 --- a/jjb/qtip/qtip-ci-jobs.yml +++ b/jjb/qtip/qtip-ci-jobs.yml @@ -171,7 +171,7 @@ - timed: '0 3 * * *' #- trigger: -# name: 'qtip-daily-juniper-build1-trigger' +# name: 'qtip-daily-juniper-pod1-trigger' # triggers: # - timed : '0 0 * * *' diff --git a/utils/test/reporting/functest/img/icon-nok.png b/utils/test/reporting/functest/img/icon-nok.png Binary files differnew file mode 100644 index 000000000..526b5294b --- /dev/null +++ b/utils/test/reporting/functest/img/icon-nok.png diff --git a/utils/test/reporting/functest/img/icon-ok.png b/utils/test/reporting/functest/img/icon-ok.png Binary files differnew file mode 100644 index 000000000..3a9de2e89 --- /dev/null +++ b/utils/test/reporting/functest/img/icon-ok.png diff --git a/utils/test/reporting/functest/reporting-status.py b/utils/test/reporting/functest/reporting-status.py index 2eb0f50d5..9271717bb 100644 --- a/utils/test/reporting/functest/reporting-status.py +++ b/utils/test/reporting/functest/reporting-status.py @@ -1,4 +1,5 @@ from urllib2 import Request, urlopen, URLError +import datetime import json import jinja2 import os @@ -20,12 +21,14 @@ installers = ["apex", "compass", "fuel", "joid"] versions = ["brahmaputra", "master"] # versions = ["master"] PERIOD = 10 +MAX_SCENARIO_CRITERIA = 18 # Correspondance between the name of the test case and the name in the DB # ideally we should modify the DB to avoid such interface.... # '<name in the DB':'<name in the config'> # I know it is uggly... -test_match_matrix = {'vPing': 'vping_ssh', +test_match_matrix = {'healthcheck': 'healthcheck', + 'vPing': 'vping_ssh', 'vPing_userdata': 'vping_userdata', 'ODL': 'odl', 'ONOS': 'onos', @@ -102,6 +105,20 @@ class TestCase(object): self.isRunnable = is_runnable +class ScenarioResult(object): + def __init__(self, status, score=0): + self.status = status + self.score = score + + def getStatus(self): + return self.status + + def getScore(self): + return self.score + +# ***************************************************************************** + + def getApiResults(case, installer, scenario, version): case = case.getName() results = json.dumps([]) @@ -239,13 +256,16 @@ tempest = TestCase("Tempest", "functest", -1) # Retrieve the Functest configuration to detect which tests are relevant # according to the installer, scenario -cf = "https://git.opnfv.org/cgit/functest/plain/testcases/config_functest.yaml" +cf = "https://git.opnfv.org/cgit/functest/plain/ci/config_functest.yaml" response = requests.get(cf) functest_yaml_config = yaml.load(response.text) print "****************************************" print "* Generating reporting..... *" +print ("* Data retention = %s days *" % PERIOD) +print "* *" print "****************************************" + # For all the versions for version in versions: # For all the installers @@ -253,11 +273,16 @@ for version in versions: # get scenarios scenario_results = getScenarios(tempest, installer, version) scenario_stats = getScenarioStats(scenario_results) - items = {} + scenario_result_criteria = {} + # For all the scenarios get results for s, s_result in scenario_results.items(): testCases = [] + # Green or Red light for a given scenario + nb_test_runnable_for_this_scenario = 0 + scenario_score = 0 + # For each scenario declare the test cases # Functest cases for test_case in functest_test_list: @@ -276,31 +301,58 @@ for version in versions: test_case.checkRunnable(installer, s, functest_yaml_config) # print "testcase %s is %s" % (test_case.getName(), # test_case.isRunnable) - print "--------------------------" print ("installer %s, version %s, scenario %s:" % (installer, version, s)) for testCase in testCases: time.sleep(1) if testCase.isRunnable: + nb_test_runnable_for_this_scenario += 1 print (" Searching results for case %s " % (testCase.getName())) result = getResult(testCase, installer, s, version) testCase.setCriteria(result) items[s] = testCases - print "--------------------------" + scenario_score = scenario_score + result except: print ("installer %s, version %s, scenario %s" % (installer, version, s)) print "No data available , error %s " % (sys.exc_info()[0]) - print "****************************************" - templateLoader = jinja2.FileSystemLoader(os.path.dirname(os.path.abspath(__file__))) + # the validation criteria = nb runnable tests x 3 + scenario_criteria = nb_test_runnable_for_this_scenario * 3 + # if 0 runnable tests set criteria at a high value + if scenario_criteria < 1: + scenario_criteria = MAX_SCENARIO_CRITERIA + + s_score = str(scenario_score) + "/" + str(scenario_criteria) + s_status = "KO" + if scenario_score < scenario_criteria: + print (">>>> scenario not OK, score = %s/%s" % + (scenario_score, scenario_criteria)) + s_status = "KO" + else: + print ">>>>> scenario OK, save the information" + s_status = "OK" + with open("./release/" + version + + "/validated_scenario_history.txt", "a") as f: + time_format = "%Y-%m-%d %H:%M" + info = (datetime.datetime.now().strftime(time_format) + + ";" + installer + ";" + s + "\n") + f.write(info) + + scenario_result_criteria[s] = ScenarioResult(s_status, s_score) + print "--------------------------" + + templateLoader = jinja2.FileSystemLoader(os.path.dirname + (os.path.abspath + (__file__))) templateEnv = jinja2.Environment(loader=templateLoader) TEMPLATE_FILE = "./template/index-status-tmpl.html" template = templateEnv.get_template(TEMPLATE_FILE) outputText = template.render(scenario_stats=scenario_stats, + scenario_results=scenario_result_criteria, items=items, installer=installer, period=PERIOD, diff --git a/utils/test/reporting/functest/template/index-status-tmpl.html b/utils/test/reporting/functest/template/index-status-tmpl.html index 604f2c8e4..7a0656b74 100644 --- a/utils/test/reporting/functest/template/index-status-tmpl.html +++ b/utils/test/reporting/functest/template/index-status-tmpl.html @@ -40,12 +40,20 @@ <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="80%">Scenario</th> - <th width="20%">Iteration</th> + <th width="60%">Scenario</th> + <th width="20%">Status</th> + <th width="10%">Score</th> + <th width="10%">Iteration</th> </tr> {% for scenario,iteration in scenario_stats.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 %}</td> + <td>{{scenario_results[scenario].getScore()}}</td> <td>{{iteration}}</td> </tr> {%- endfor %} @@ -53,7 +61,6 @@ </div> - {% for scenario, iteration in scenario_stats.iteritems() -%} <div class="scenario-part"> <div class="page-header"> |