From 0d87caa1b785588ffb9a92f37420bc688ebed01d Mon Sep 17 00:00:00 2001 From: rohitsakala Date: Fri, 16 Dec 2016 00:38:41 +0530 Subject: Create Jenkins Job for testapi automation Right now, only builder for creating testapi doc is included JIRA: FUNCTEST-664 Change-Id: If0a34154084c1d01ed6b997d2226779da43bcb14 Signed-off-by: rohitsakala --- utils/test/testapi/htmlize/push-doc-artifact.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 utils/test/testapi/htmlize/push-doc-artifact.sh (limited to 'utils/test/testapi/htmlize/push-doc-artifact.sh') diff --git a/utils/test/testapi/htmlize/push-doc-artifact.sh b/utils/test/testapi/htmlize/push-doc-artifact.sh new file mode 100644 index 000000000..383565df1 --- /dev/null +++ b/utils/test/testapi/htmlize/push-doc-artifact.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -e +set -o pipefail + +export PATH=$PATH:/usr/local/bin/ + +project=$PROJECT +workspace=$WORKSPACE +artifact_dir="functest/docs" + +set +e +gsutil&>/dev/null +if [ $? != 0 ]; then + echo "Not possible to push results to artifact: gsutil not installed" +else + gsutil ls gs://artifacts.opnfv.org/"$project"/ &>/dev/null + if [ $? != 0 ]; then + echo "Not possible to push results to artifact: gsutil not installed." + 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" + fi +fi -- cgit 1.2.3-korg