summaryrefslogtreecommitdiffstats
path: root/ci/htmlize/push-doc-artifact.sh
diff options
context:
space:
mode:
authorTrevor Bramwell <tbramwell@linuxfoundation.org>2017-11-10 15:25:33 -0800
committerTrevor Bramwell <tbramwell@linuxfoundation.org>2017-11-10 15:30:05 -0800
commit48a16b2f416af135a60e92e1292bb126ba38523c (patch)
tree822f6f5f93dbc322779eab552a335bb33184b2c4 /ci/htmlize/push-doc-artifact.sh
parent5dba82b4e8b5560eb726603d290698ca4c22ea11 (diff)
Initial Commit CI Files
These files come from the releng repository and are used in the automated deploy of testapi. Moving them into this repository removes the need to clone multiple repositories when deploying the testapi site and verifying the repository. Change-Id: Ibd54c47bd76e3f2d801cfb4eaaeb1623bd1ae7b9 Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Diffstat (limited to 'ci/htmlize/push-doc-artifact.sh')
-rw-r--r--ci/htmlize/push-doc-artifact.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/ci/htmlize/push-doc-artifact.sh b/ci/htmlize/push-doc-artifact.sh
new file mode 100644
index 0000000..e6432d3
--- /dev/null
+++ b/ci/htmlize/push-doc-artifact.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