summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi/htmlize
diff options
context:
space:
mode:
authorrohitsakala <rohitsakala@gmail.com>2017-01-18 12:32:35 +0530
committerRohit Sakala <rohitsakala@gmail.com>2017-01-20 09:47:44 +0000
commitd92523aaeb0066e846b3cb1dc154f5731a2e6247 (patch)
tree3deeefe62760f680337de2d064c5d615438defac /utils/test/testapi/htmlize
parente4255d7307698d5ab580f3759a0c59345ee2dd44 (diff)
Add exit in build script to notify jenkins
Jenkins job gives success even if swagger codegen fails, so added appropriate code to make jenkins build fail if swagger codegen fails. Change-Id: Ia8e61a7b37531ecfa16c7fd60bf8101d6da9fc5f Signed-off-by: rohitsakala <rohitsakala@gmail.com>
Diffstat (limited to 'utils/test/testapi/htmlize')
-rw-r--r--utils/test/testapi/htmlize/doc-build.sh2
-rw-r--r--utils/test/testapi/htmlize/htmlize.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/utils/test/testapi/htmlize/doc-build.sh b/utils/test/testapi/htmlize/doc-build.sh
index e492c97b5..427b4378b 100644
--- a/utils/test/testapi/htmlize/doc-build.sh
+++ b/utils/test/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/utils/test/testapi/htmlize/htmlize.py b/utils/test/testapi/htmlize/htmlize.py
index 68d02febd..c07f98ecf 100644
--- a/utils/test/testapi/htmlize/htmlize.py
+++ b/utils/test/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 \