cloud-build/cloud-build.py

41 lines
743 B
Python
Raw Normal View History

2019-03-28 03:28:51 +03:00
#!/usr/bin/python3
import argparse
2020-04-06 23:29:37 +03:00
from cloud_build import CB
2019-07-08 02:14:01 +03:00
2019-03-28 03:28:51 +03:00
PROG = 'cloud-build'
def parse_args():
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
parser.add_argument(
'-c',
'--config',
default=f'/etc/{PROG}/config.yaml',
help='path to config',
)
2019-11-01 16:44:46 +03:00
parser.add_argument(
'--no-tests',
action='store_true',
help='disable running tests',
)
2019-03-28 03:28:51 +03:00
args = parser.parse_args()
return args
def main():
args = parse_args()
2019-11-01 16:44:46 +03:00
cloud_build = CB(args)
cloud_build.create_images()
cloud_build.copy_external_files()
cloud_build.sign()
2019-03-28 03:28:51 +03:00
cloud_build.sync()
if __name__ == '__main__':
main()