-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrunner.py
More file actions
26 lines (24 loc) · 868 Bytes
/
runner.py
File metadata and controls
26 lines (24 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import pypline
import argparse
import os
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="GA Pipeline Runner")
parser.add_argument("-v", action="store_const", const=True,
help="Verbose mode")
parser.add_argument("filename")
args = parser.parse_args()
filename = args.filename
filetype = os.path.splitext(filename)[1]
if filetype == ".yaml":
if args.v:
print("Parsing YAML")
builder = pypline.YamlManagerBuilder()
manager = builder.build_manager(filename)
manager.generate_pipelines()
if args.v:
print("Generated {} pipeline{}".format(
(len(manager.pipelines),
"s" if len(manager.pipelines) > 1 else "")))
manager.execute(verbose=args.v)
if args.v:
print("Run Complete")