summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorrohitsakala <rohitsakala@gmail.com>2017-06-29 22:08:05 +0530
committerSakala Venkata Krishna Rohit <rohitsakala@gmail.com>2017-07-02 19:46:25 +0000
commit0466d549e60cb77068242a2df1bac0cbe262975a (patch)
treeed02760df775245a012c60a7927447886c6e34c0 /utils
parent1a1d548a72bd91ca1f1241ec8fb4c8afb944ab88 (diff)
Add jenkins jobs for automatic reporting dashboard deployment
Jenkins Jobs have been added for automating the deployment of the reporting dashboard. Also multijob has been added for automating the update of docker in the docker hub and generating docs which is empty for now. Modified unit tests of reporting to make it run from any directory. Modified the testapi jenkins jobs yaml file to generic so that many other modules which may have the same usecases can be integrated easily just like the reporting one that is done now. Change-Id: Id13a55416e17199dae1dd6ce64f7c167d117ba37 Signed-off-by: Sakala Venkata Krishna Rohit <rohitsakala@gmail.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/test/reporting/docker/requirements.pip1
-rwxr-xr-xutils/test/reporting/run_test.sh44
-rwxr-xr-xutils/test/reporting/run_unit_tests.sh43
3 files changed, 45 insertions, 43 deletions
diff --git a/utils/test/reporting/docker/requirements.pip b/utils/test/reporting/docker/requirements.pip
index 6de856e35..aeee3ba96 100644
--- a/utils/test/reporting/docker/requirements.pip
+++ b/utils/test/reporting/docker/requirements.pip
@@ -12,3 +12,4 @@ PyYAML==3.11
simplejson==3.8.1
jinja2==2.8
tornado==4.4.2
+requests==2.12.5
diff --git a/utils/test/reporting/run_test.sh b/utils/test/reporting/run_test.sh
new file mode 100755
index 000000000..8c674ce5f
--- /dev/null
+++ b/utils/test/reporting/run_test.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+set -o errexit
+set -o pipefail
+
+
+# Get script directory
+SCRIPTDIR=`dirname $0`
+
+# Creating virtual environment
+if [ ! -z $VIRTUAL_ENV ]; then
+ venv=$VIRTUAL_ENV
+else
+ venv=$SCRIPTDIR/.venv
+ virtualenv $venv
+fi
+
+source $venv/bin/activate
+
+export CONFIG_REPORTING_YAML=$SCRIPTDIR/reporting.yaml
+
+# ***************
+# Run unit tests
+# ***************
+echo "Running unit tests..."
+
+# install python packages
+easy_install -U setuptools
+easy_install -U pip
+pip install -r $SCRIPTDIR/docker/requirements.pip
+pip install -e $SCRIPTDIR
+
+python $SCRIPTDIR/setup.py develop
+
+# unit tests
+# TODO: remove cover-erase
+# To be deleted when all functest packages will be listed
+nosetests --with-xunit \
+ --cover-package=$SCRIPTDIR/utils \
+ --with-coverage \
+ --cover-xml \
+ $SCRIPTDIR/tests/unit
+rc=$?
+
+deactivate
diff --git a/utils/test/reporting/run_unit_tests.sh b/utils/test/reporting/run_unit_tests.sh
deleted file mode 100755
index 6b0e3b2b1..000000000
--- a/utils/test/reporting/run_unit_tests.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-set -o errexit
-set -o pipefail
-
-# ******************************
-# prepare the env for the tests
-# ******************************
-# Either Workspace is set (CI)
-if [ -z $WORKSPACE ]
-then
- WORKSPACE="."
-fi
-
-export CONFIG_REPORTING_YAML=./reporting.yaml
-
-# ***************
-# Run unit tests
-# ***************
-echo "Running unit tests..."
-
-# start vitual env
-virtualenv $WORKSPACE/reporting_venv
-source $WORKSPACE/reporting_venv/bin/activate
-
-# install python packages
-easy_install -U setuptools
-easy_install -U pip
-pip install -r $WORKSPACE/docker/requirements.pip
-pip install -e $WORKSPACE
-
-python $WORKSPACE/setup.py develop
-
-# unit tests
-# TODO: remove cover-erase
-# To be deleted when all functest packages will be listed
-nosetests --with-xunit \
- --cover-package=utils \
- --with-coverage \
- --cover-xml \
- tests/unit
-rc=$?
-
-deactivate