tricks/scripts/args.py

24 lines
644 B
Python
Raw Permalink Normal View History

import argparse
def argument_parse() -> argparse.ArgumentParser:
"""
Method to extract the arguments from the command line.
:returns: The argument parser.
"""
parser = argparse.ArgumentParser(
description="A tool to automate image manipulation in the pipeline.")
parser.add_argument(
'-i', '--image', type=str,
help='The image name.')
parser.add_argument(
'-t', '--tag', type=str,
help='The image tag.')
parser.add_argument(
'-g', '--git-tag', type=str,
required=False,
help='The git tag to attach to a report.')
return parser.parse_args()