summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2017-01-20 11:32:51 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-01-20 11:32:51 +0000
commit7099de10678c347a91cd535aae08f2053d446574 (patch)
tree1b599da19ab7d0ece0047f84f73173d48b202163
parent9a3f404f327d0b7eb802bd674d62e6f194370ccc (diff)
parent3cc9dda64505e958a951923fc489829842819073 (diff)
Merge "Add exit in build script to notify jenkins"
-rw-r--r--testapi/htmlize/doc-build.sh2
-rw-r--r--testapi/htmlize/htmlize.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/testapi/htmlize/doc-build.sh b/testapi/htmlize/doc-build.sh
index e492c97..427b437 100644
--- a/testapi/htmlize/doc-build.sh
+++ b/testapi/htmlize/doc-build.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+set -o errexit
+
# Create virtual environment
source $WORKSPACE/testapi_venv/bin/activate
diff --git a/testapi/htmlize/htmlize.py b/testapi/htmlize/htmlize.py
index 68d02fe..c07f98e 100644
--- a/testapi/htmlize/htmlize.py
+++ b/testapi/htmlize/htmlize.py
@@ -28,7 +28,10 @@ def main(args):
# Generating html page
cmd = 'java -jar swagger-codegen-cli.jar generate \
-i specs.json -l html2 -o %s' % (args.output_directory)
- os.system(cmd)
+ if os.system(cmd) == 0:
+ exit(0)
+ else:
+ exit(1)
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Create \