Improve exitcodes so jenkins can deal with it

This commit is contained in:
Hugo Trippaers 2014-08-01 08:53:50 +02:00
parent f7c664fc2e
commit 880f186ede

View File

@ -1118,9 +1118,12 @@ if __name__ == "__main__":
cfg, cfg,
tc_run_logger, tc_run_logger,
log_folder_path=log_folder_path) log_folder_path=log_folder_path)
deploy.deploy() if deploy.deploy() == FAILED
print "\n===Deploy Failed==="
tc_run_logger.debug("\n===Deploy Failed===");
exit(1) exit(1)
if options.remove and os.path.isfile(options.remove) and options.input: if options.remove and os.path.isfile(options.remove) and options.input:
''' '''
@Desc : Removes a Data Center with provided Config @Desc : Removes a Data Center with provided Config
@ -1133,7 +1136,10 @@ if __name__ == "__main__":
if remove_dc_obj.removeDataCenter() == FAILED: if remove_dc_obj.removeDataCenter() == FAILED:
print "\n===Removing DataCenter Failed===" print "\n===Removing DataCenter Failed==="
tc_run_logger.debug("\n===Removing DataCenter Failed===") tc_run_logger.debug("\n===Removing DataCenter Failed===")
exit(1)
else: else:
print "\n===Removing DataCenter Successful===" print "\n===Removing DataCenter Successful==="
tc_run_logger.debug("\n===Removing DataCenter Successful===") tc_run_logger.debug("\n===Removing DataCenter Successful===")
exit(1)
# All OK exit with 0 exitcode
exit(0)