summaryrefslogtreecommitdiffstats
path: root/testapi/htmlize
diff options
context:
space:
mode:
authorrohitsakala <rohitsakala@gmail.com>2017-01-06 13:01:56 +0530
committerrohitsakala <rohitsakala@gmail.com>2017-01-16 22:24:28 +0530
commit855b18920fb5678bbf895cd91d244a9de5270e21 (patch)
tree94e584c716f862c9dda6aa4b67f6ccccb6295de4 /testapi/htmlize
parent43092f3b023fa82c93ce2cbd6e0ca5bc16da5bf1 (diff)
Fix a bug - add requests in virtualenv
Change-Id: Iecd20b69f7a3abf04a34d4ee7e9c94f1a039d8b1 Signed-off-by: rohitsakala <rohitsakala@gmail.com>
Diffstat (limited to 'testapi/htmlize')
-rw-r--r--testapi/htmlize/doc-build.sh9
-rw-r--r--testapi/htmlize/finish.sh2
-rw-r--r--testapi/htmlize/prepare.sh3
-rw-r--r--testapi/htmlize/push-doc-artifact.sh6
4 files changed, 13 insertions, 7 deletions
diff --git a/testapi/htmlize/doc-build.sh b/testapi/htmlize/doc-build.sh
new file mode 100644
index 0000000..e492c97
--- /dev/null
+++ b/testapi/htmlize/doc-build.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# Create virtual environment
+source $WORKSPACE/testapi_venv/bin/activate
+
+# Install Pre-requistics
+pip install requests
+
+python ./utils/test/testapi/htmlize/htmlize.py -o ${WORKSPACE}/
diff --git a/testapi/htmlize/finish.sh b/testapi/htmlize/finish.sh
index d24ae05..dc3aa86 100644
--- a/testapi/htmlize/finish.sh
+++ b/testapi/htmlize/finish.sh
@@ -13,5 +13,3 @@ if [ $proc_number -gt 0 ]; then
echo "Kill opnfv-testapi server $procs"
ps -ef | grep opnfv-testapi | grep -v grep | awk '{print $2}' | xargs kill -kill &>/dev/null
fi
-
-deactivate
diff --git a/testapi/htmlize/prepare.sh b/testapi/htmlize/prepare.sh
index 67158f2..e79ac56 100644
--- a/testapi/htmlize/prepare.sh
+++ b/testapi/htmlize/prepare.sh
@@ -9,9 +9,6 @@
virtualenv testapi_venv
source testapi_venv/bin/activate
-# Install Pre-requisites
-pip install requests
-
# Swgger Codegen Tool
url="http://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.2.1/swagger-codegen-cli-2.2.1.jar"
diff --git a/testapi/htmlize/push-doc-artifact.sh b/testapi/htmlize/push-doc-artifact.sh
index 383565d..4cf1988 100644
--- a/testapi/htmlize/push-doc-artifact.sh
+++ b/testapi/htmlize/push-doc-artifact.sh
@@ -7,19 +7,21 @@ export PATH=$PATH:/usr/local/bin/
project=$PROJECT
workspace=$WORKSPACE
-artifact_dir="functest/docs"
+artifact_dir="$project/docs"
set +e
gsutil&>/dev/null
if [ $? != 0 ]; then
echo "Not possible to push results to artifact: gsutil not installed"
+ exit 1
else
gsutil ls gs://artifacts.opnfv.org/"$project"/ &>/dev/null
if [ $? != 0 ]; then
echo "Not possible to push results to artifact: gsutil not installed."
+ exit 1
else
echo "Uploading document to artifact $artifact_dir"
gsutil cp "$workspace"/index.html gs://artifacts.opnfv.org/"$artifact_dir"/testapi.html >/dev/null 2>&1
- echo "Document can be found at http://artifacts.opnfv.org/functest/docs/testapi.html"
+ echo "Document can be found at http://artifacts.opnfv.org/releng/docs/testapi.html"
fi
fi