diff options
author | hongbo tian <hongbo.tianhongbo@huawei.com> | 2017-09-28 09:28:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-09-28 09:28:41 +0000 |
commit | 61820ee85c967d90021e4089c6a7907046685639 (patch) | |
tree | 0c3f23e2146f0855fb5be0ff55343d59e3a9c9ab /cvp/htmlize/push-doc-artifact.sh | |
parent | 0cc2fdefa9e6e959e7c69beede736738f339f636 (diff) | |
parent | 0cf6b232ac9cf128ee9183a27c08f4f74ab2e2e6 (diff) |
Merge "add api&web services for cvp"
Diffstat (limited to 'cvp/htmlize/push-doc-artifact.sh')
-rw-r--r-- | cvp/htmlize/push-doc-artifact.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cvp/htmlize/push-doc-artifact.sh b/cvp/htmlize/push-doc-artifact.sh new file mode 100644 index 00000000..4cf1988b --- /dev/null +++ b/cvp/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 |