tricks/scripts/args.py
Elia el Lazkani f2b4f86269
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing
chore(): Migrating to testing python automation
2023-07-05 23:01:39 +02:00

23 lines
644 B
Python

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()