dockerfile_dir = f'{image_root}/{name}' image_name = f'{name}' gcp_conf = conf.providers.gcp _cmd = f'docker images | grep {tag} | grep {image_name};' image_trace = async_cmd(_cmd) logging.info(f"{name} image_trace: {image_trace}") # Check if the list is empty if force or not image_trace: logging.info(f"attempting to create image {name}") os.system(f'docker build -t {image_name}:{tag} {dockerfile_dir};' f'echo "These are the resulting images:";' f'docker images | grep {tag} | grep {image_name};') if push: push_image(gcp_conf) if __name__ == "__main__": setup_logging(log_level=logging.DEBUG) logging.info('Poomba') logging.debug('Simba')
parser.add_argument( '-fr', '--framework', type=LanguageFramework, choices=list(LanguageFramework), help= 'A framework corresponding to code language for containers of the microservice ' 'e.g python flask or java spring-boot', default=LanguageFramework.FLASK) parser.add_argument('-ll', '--log_level', type=LogLevel, choices=list(LogLevel), help='LogLevel: as in Python logging', default=LogLevel.INFO) return parser if __name__ == "__main__": setup_logging() _kube_parser = get_kube_parser() _kube_args = _kube_parser.parse_args() _conf = process_args(_kube_args) destroy_sanity(_conf)