def main(): setup_logging() try: if post_receive_hook_command() is False: sys.exit(1) except Exception: logger.exception('Deploy failed') sys.exit(1)
def main(): setup_logging() parser = argparse.ArgumentParser() parser.add_argument( '--kubernetes-url', default='http://localhost:8001', help='The URL for the Kubernetes API.') parser.add_argument('--destination', default='/etc/ssh') args = parser.parse_args() run(args)
def run_command(parser): setup_logging() args = parser.parse_args() try: result = args.func(args) if result is False: sys.exit(1) except Exception: logger.exception('Command failed') sys.exit(1)