summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jjb/barometer/barometer-upload-artifact.sh6
-rw-r--r--jjb/barometer/barometer.yml3
-rw-r--r--jjb/ci_gate_security/opnfv-ci-gate-security.yml3
-rw-r--r--jjb/dovetail/dovetail-ci-jobs.yml4
-rwxr-xr-xjjb/dovetail/dovetail-run.sh5
-rwxr-xr-xjjb/functest/functest-loop.sh2
-rwxr-xr-xjjb/functest/functest-suite.sh2
-rwxr-xr-xjjb/functest/set-functest-env.sh2
-rw-r--r--jjb/xci/bifrost-periodic-jobs.yml2
-rw-r--r--jjb/xci/osa-periodic-jobs.yml2
-rw-r--r--prototypes/xci/README.rst6
-rwxr-xr-xutils/jenkins-jnlp-connect.sh4
-rw-r--r--utils/test/reporting/pages/app/scripts/controllers/testvisual.controller.js2
-rw-r--r--utils/test/reporting/pages/app/views/commons/testCaseVisual.html4
-rw-r--r--utils/test/testapi/opnfv_testapi/resources/handlers.py68
15 files changed, 72 insertions, 43 deletions
diff --git a/jjb/barometer/barometer-upload-artifact.sh b/jjb/barometer/barometer-upload-artifact.sh
index 887c4924e..817cc5770 100644
--- a/jjb/barometer/barometer-upload-artifact.sh
+++ b/jjb/barometer/barometer-upload-artifact.sh
@@ -17,12 +17,12 @@ echo "Uploading the barometer RPMs to artifacts.opnfv.org"
echo "---------------------------------------------------"
echo
-gsutil -m cp -r $RPM_DIR/* $OPNFV_ARTIFACT_URL > $WORKSPACE/gsutil.log 2>&1
+gsutil -m cp -r $RPM_DIR/* gs://$OPNFV_ARTIFACT_URL > $WORKSPACE/gsutil.log 2>&1
# Check if the RPMs were pushed
-gsutil ls $OPNFV_ARTIFACT_URL > /dev/null 2>&1
+gsutil ls gs://$OPNFV_ARTIFACT_URL > /dev/null 2>&1
if [[ $? -ne 0 ]]; then
- echo "Problem while uploading barometer RPMs to $OPNFV_ARTIFACT_URL!"
+ echo "Problem while uploading barometer RPMs to gs://$OPNFV_ARTIFACT_URL!"
echo "Check log $WORKSPACE/gsutil.log on the appropriate build server"
exit 1
fi
diff --git a/jjb/barometer/barometer.yml b/jjb/barometer/barometer.yml
index c8fb9e25b..2d3e972f8 100644
--- a/jjb/barometer/barometer.yml
+++ b/jjb/barometer/barometer.yml
@@ -115,7 +115,6 @@
- shell: |
pwd
cd src
- ./install_build_deps.sh
make clobber
make
@@ -135,6 +134,8 @@
- project-parameter:
project: '{project}'
branch: '{branch}'
+ - barometer-project-parameter:
+ gs-pathname: '{gs-pathname}'
- 'opnfv-build-centos-defaults'
scm:
diff --git a/jjb/ci_gate_security/opnfv-ci-gate-security.yml b/jjb/ci_gate_security/opnfv-ci-gate-security.yml
index 489dbc507..e2f6ceb7b 100644
--- a/jjb/ci_gate_security/opnfv-ci-gate-security.yml
+++ b/jjb/ci_gate_security/opnfv-ci-gate-security.yml
@@ -77,7 +77,7 @@
comment-contains-value: 'reverify'
projects:
- project-compare-type: 'REG_EXP'
- project-pattern: 'sandbox|releng|octopus|pharos|functest'
+ project-pattern: 'apex|armband|bamboo|barometer|bottlenecks|calipso|compass4nfv|conductor|cooper|functest|octopus|pharos|releng|sandbox'
branches:
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
@@ -115,3 +115,4 @@
!include-raw:
- ./anteater-clone-all-repos.sh
- ./anteater-security-audit-weekly.sh
+
diff --git a/jjb/dovetail/dovetail-ci-jobs.yml b/jjb/dovetail/dovetail-ci-jobs.yml
index 9fdce31f3..6bcaea26f 100644
--- a/jjb/dovetail/dovetail-ci-jobs.yml
+++ b/jjb/dovetail/dovetail-ci-jobs.yml
@@ -229,6 +229,10 @@
name: DOVETAIL_REPO_DIR
default: "/home/opnfv/dovetail"
description: "Directory where the dovetail repository is cloned"
+ - string:
+ name: SUT_BRANCH
+ default: '{branch}'
+ description: "SUT branch"
scm:
- git-scm
diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh
index d423e9d29..85bc54d90 100755
--- a/jjb/dovetail/dovetail-run.sh
+++ b/jjb/dovetail/dovetail-run.sh
@@ -52,7 +52,12 @@ releng_repo=${WORKSPACE}/releng
git clone https://gerrit.opnfv.org/gerrit/releng ${releng_repo} >/dev/null
if [[ ${INSTALLER_TYPE} != 'joid' ]]; then
+ echo "SUT branch is $SUT_BRANCH"
+ echo "dovetail branch is $BRANCH"
+ BRANCH_BACKUP=$BRANCH
+ export BRANCH=$SUT_BRANCH
${releng_repo}/utils/fetch_os_creds.sh -d ${OPENRC} -i ${INSTALLER_TYPE} -a ${INSTALLER_IP} >${redirect}
+ export BRANCH=$BRANCH_BACKUP
fi
if [[ -f $OPENRC ]]; then
diff --git a/jjb/functest/functest-loop.sh b/jjb/functest/functest-loop.sh
index 676890644..a590d9f95 100755
--- a/jjb/functest/functest-loop.sh
+++ b/jjb/functest/functest-loop.sh
@@ -2,7 +2,7 @@
set +e
[[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+="-r"
-cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/run_tests.py -t all ${flags}"
+cmd="run_tests -t all ${flags}"
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
index 5d1ed28f5..469a57726 100755
--- a/jjb/functest/functest-suite.sh
+++ b/jjb/functest/functest-suite.sh
@@ -10,7 +10,7 @@ global_ret_val=0
tests=($(echo $FUNCTEST_SUITE_NAME | tr "," "\n"))
for test in ${tests[@]}; do
- cmd="python /home/opnfv/repos/functest/functest/ci/run_tests.py -t $test"
+ cmd="run_tests -t $test"
docker exec $container_id $cmd
let global_ret_val+=$?
done
diff --git a/jjb/functest/set-functest-env.sh b/jjb/functest/set-functest-env.sh
index 558e2487d..01cab5e0f 100755
--- a/jjb/functest/set-functest-env.sh
+++ b/jjb/functest/set-functest-env.sh
@@ -90,7 +90,7 @@ if [ $(docker ps | grep "${FUNCTEST_IMAGE}:${DOCKER_TAG}" | wc -l) == 0 ]; then
exit 1
fi
-cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/prepare_env.py start"
+cmd="prepare_env start"
echo "Executing command inside the docker: ${cmd}"
docker exec ${container_id} ${cmd}
diff --git a/jjb/xci/bifrost-periodic-jobs.yml b/jjb/xci/bifrost-periodic-jobs.yml
index 3e9ff678e..9773cfd9e 100644
--- a/jjb/xci/bifrost-periodic-jobs.yml
+++ b/jjb/xci/bifrost-periodic-jobs.yml
@@ -135,7 +135,7 @@
# trigger is disabled until we know which jobs we will have
# and adjust stuff accordingly
triggers:
- - timed: '#@midnight'
+ - timed: '' # '@midnight'
builders:
- description-setter:
diff --git a/jjb/xci/osa-periodic-jobs.yml b/jjb/xci/osa-periodic-jobs.yml
index 56a4b18b4..722b077ac 100644
--- a/jjb/xci/osa-periodic-jobs.yml
+++ b/jjb/xci/osa-periodic-jobs.yml
@@ -132,7 +132,7 @@
# trigger is disabled until we know which jobs we will have
# and adjust stuff accordingly
triggers:
- - timed: '#@midnight'
+ - timed: '' # '@midnight'
builders:
- description-setter:
diff --git a/prototypes/xci/README.rst b/prototypes/xci/README.rst
index b65abde9b..ecb8e19dc 100644
--- a/prototypes/xci/README.rst
+++ b/prototypes/xci/README.rst
@@ -196,8 +196,10 @@ on each run.
To enable it, you need to export the different DEV_PATH vars:
- export OPNFV_RELENG_DEV_PATH=/opt/releng/
-- export OPENSTACK_BIFROST_DEV_PATH=/opt/bifrost
-- export OPENSTACK_OSA_DEV_PATH=/opt/openstack-ansible
+- export OPENSTACK_BIFROST_DEV_PATH=/opt/bifrost/
+- export OPENSTACK_OSA_DEV_PATH=/opt/openstack-ansible/
+
+Please note the trailing slahses.
This will cause the deployment to pick the development copies stored at the
specified directories, and use them instead of cloning those on every run.
diff --git a/utils/jenkins-jnlp-connect.sh b/utils/jenkins-jnlp-connect.sh
index 8fce2e021..c46ca89f5 100755
--- a/utils/jenkins-jnlp-connect.sh
+++ b/utils/jenkins-jnlp-connect.sh
@@ -61,8 +61,8 @@ main () {
#make pid dir
pidfile="/var/run/$jenkinsuser/jenkins_jnlp_pid"
if ! [ -d /var/run/$jenkinsuser/ ]; then
- mkdir /var/run/$jenkinsuser/
- chown $jenkinsuser:$jenkinsuser /var/run/$jenkinsuser/
+ sudo mkdir /var/run/$jenkinsuser/
+ sudo chown $jenkinsuser:$jenkinsuser /var/run/$jenkinsuser/
fi
if [[ $skip_monit != true ]]; then
diff --git a/utils/test/reporting/pages/app/scripts/controllers/testvisual.controller.js b/utils/test/reporting/pages/app/scripts/controllers/testvisual.controller.js
index def8e7293..ae51e4ab0 100644
--- a/utils/test/reporting/pages/app/scripts/controllers/testvisual.controller.js
+++ b/utils/test/reporting/pages/app/scripts/controllers/testvisual.controller.js
@@ -16,7 +16,7 @@ angular.module('opnfvApp')
$scope.vsperf = "542,185,640,414";
$scope.stor = "658,187,750,410";
$scope.qtip = "769,190,852,416";
- $scope.bootleneck = "870,192,983,419";
+ $scope.bottlenecks = "870,192,983,419";
$scope.noPopArea1 = "26,8,1190,180";
$scope.noPopArea2 = "1018,193,1190,590";
$scope.noPopArea3 = "37,455,1003,584";
diff --git a/utils/test/reporting/pages/app/views/commons/testCaseVisual.html b/utils/test/reporting/pages/app/views/commons/testCaseVisual.html
index 74eb56eba..4de4e187f 100644
--- a/utils/test/reporting/pages/app/views/commons/testCaseVisual.html
+++ b/utils/test/reporting/pages/app/views/commons/testCaseVisual.html
@@ -20,7 +20,7 @@
<area shape="rect" coords={{vsperf}} alt="test" href="{{vsperfurl}}" onmouseover="pop(event)" ng-mouseover="myTrigger('vsperf')" />
<area shape="rect" coords={{stor}} alt="test" href="{{storperfurl}}" onmouseover="pop(event)" ng-mouseover="myTrigger('storperf')"/>
<area shape="rect" coords={{qtip}} alt="test" href="{{qtipurl}}" onmouseover="pop(event)" ng-mouseover="myTrigger('qtip')" />
- <area shape="rect" coords={{bootleneck}} alt="test" href="{{bottlenecksurl}}" onmouseover="pop(event)" ng-mouseover="myTrigger('bootlenecks')" />
+ <area shape="rect" coords={{bottlenecks}} alt="test" href="{{bottlenecksurl}}" onmouseover="pop(event)" ng-mouseover="myTrigger('bottlenecks')" />
<area shape="rect" coords={{noPopArea1}} alt="test" onmouseover="pophide(event)" />
<area shape="rect" coords={{noPopArea2}} alt="test" onmouseover="pophide(event)" />
<area shape="rect" coords={{noPopArea3}} alt="test" onmouseover="pophide(event)" />
@@ -124,4 +124,4 @@
$('#popup').hide();
return true;
}
- </script> \ No newline at end of file
+ </script>
diff --git a/utils/test/testapi/opnfv_testapi/resources/handlers.py b/utils/test/testapi/opnfv_testapi/resources/handlers.py
index 5c98c48ef..c7fed8f17 100644
--- a/utils/test/testapi/opnfv_testapi/resources/handlers.py
+++ b/utils/test/testapi/opnfv_testapi/resources/handlers.py
@@ -101,55 +101,71 @@ class GenericApiHandler(web.RequestHandler):
@web.asynchronous
@gen.coroutine
def _list(self, query=None, res_op=None, *args, **kwargs):
- if query is None:
- query = {}
- data = []
sort = kwargs.get('sort')
page = kwargs.get('page', 0)
last = kwargs.get('last', 0)
per_page = kwargs.get('per_page', 0)
-
+ if query is None:
+ query = {}
cursor = self._eval_db(self.table, 'find', query)
records_count = yield cursor.count()
- records_nr = records_count
- if (records_count > last) and (last > 0):
- records_nr = last
-
- pipelines = list()
- if query:
- pipelines.append({'$match': query})
- if sort:
- pipelines.append({'$sort': sort})
-
- if page > 0:
- total_pages, remainder = divmod(records_nr, per_page)
- if remainder > 0:
- total_pages += 1
- pipelines.append({'$skip': (page - 1) * per_page})
- pipelines.append({'$limit': per_page})
- elif last > 0:
- pipelines.append({'$limit': last})
-
+ total_pages = self._calc_total_pages(records_count,
+ last,
+ page,
+ per_page)
+ pipelines = self._set_pipelines(query, sort, last, page, per_page)
cursor = self._eval_db(self.table,
'aggregate',
pipelines,
allowDiskUse=True)
-
+ data = list()
while (yield cursor.fetch_next):
data.append(self.format_data(cursor.next_object()))
if res_op is None:
res = {self.table: data}
else:
res = res_op(data, *args)
- if page:
+ if total_pages > 0:
res.update({
'pagination': {
- 'current_page': page,
+ 'current_page': kwargs.get('page'),
'total_pages': total_pages
}
})
self.finish_request(res)
+ @staticmethod
+ def _calc_total_pages(records_count, last, page, per_page):
+ records_nr = records_count
+ if (records_count > last) and (last > 0):
+ records_nr = last
+
+ total_pages = 0
+ if page > 0:
+ total_pages, remainder = divmod(records_nr, per_page)
+ if remainder > 0:
+ total_pages += 1
+ if page > total_pages:
+ raises.BadRequest(
+ 'Request page > total_pages [{}]'.format(total_pages))
+ return total_pages
+
+ @staticmethod
+ def _set_pipelines(query, sort, last, page, per_page):
+ pipelines = list()
+ if query:
+ pipelines.append({'$match': query})
+ if sort:
+ pipelines.append({'$sort': sort})
+
+ if page > 0:
+ pipelines.append({'$skip': (page - 1) * per_page})
+ pipelines.append({'$limit': per_page})
+ elif last > 0:
+ pipelines.append({'$limit': last})
+
+ return pipelines
+
@web.asynchronous
@gen.coroutine
@check.not_exist