From b3e40f026d655501bfa581452c447784604ecb05 Mon Sep 17 00:00:00 2001 From: xudan Date: Fri, 6 Jul 2018 05:16:40 -0400 Subject: Move all web portal code to the new repo dovetail-webportal This is only the first step to simply copy the file here. There still need some more work to make sure all work well. All the changes will be submitted with other patches to make it easily to review. JIRA: DOVETAIL-671 Change-Id: I64d32a9df562184166b6199e2719f298687d1a0a Signed-off-by: xudan --- htmlize/push-doc-artifact.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 htmlize/push-doc-artifact.sh (limited to 'htmlize/push-doc-artifact.sh') diff --git a/htmlize/push-doc-artifact.sh b/htmlize/push-doc-artifact.sh new file mode 100644 index 0000000..4cf1988 --- /dev/null +++ b/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/docs/testapi.html" + fi +fi -- cgit 1.2.3-korg