summaryrefslogtreecommitdiffstats
path: root/ci/htmlize/push-doc-artifacts.sh
diff options
context:
space:
mode:
authorSakala Venkata Krishna Rohit <rohitsakala@gmail.com>2018-03-26 23:07:47 +0530
committerSakala Venkata Krishna Rohit <rohitsakala@gmail.com>2018-03-26 23:09:11 +0530
commitc20c8286d72ca64751162b1932e0e3f680f0e32f (patch)
treeb2d50a5d96bdaba55b922ecebdb4f57a8910812c /ci/htmlize/push-doc-artifacts.sh
parent6d072ed7c87ebc44a3b002003b4fa0af22590b68 (diff)
BugFix for testapi automate job
push doc file name was not matching. Change-Id: I151db14dca564b7c2c0e830cf359157e223dddeb
Diffstat (limited to 'ci/htmlize/push-doc-artifacts.sh')
-rw-r--r--ci/htmlize/push-doc-artifacts.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/ci/htmlize/push-doc-artifacts.sh b/ci/htmlize/push-doc-artifacts.sh
new file mode 100644
index 0000000..e6432d3
--- /dev/null
+++ b/ci/htmlize/push-doc-artifacts.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+set -e
+set -o pipefail
+
+export PATH=$PATH:/usr/local/bin/
+
+project=$PROJECT
+workspace=$WORKSPACE
+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/releng-testresults/docs/testapi.html"
+ fi
+fi