Example #1
0
 def load_image(self, image_name, task_id, tag):
     from taskgraph.docker import load_image_by_name, load_image_by_task_id
     if not image_name and not task_id:
         print("Specify either IMAGE-NAME or TASK-ID")
         sys.exit(1)
     try:
         if task_id:
             ok = load_image_by_task_id(task_id, tag)
         else:
             ok = load_image_by_name(image_name, tag)
         if not ok:
             sys.exit(1)
     except Exception:
         traceback.print_exc()
         sys.exit(1)
Example #2
0
 def load_image(self, image_name, task_id, tag):
     from taskgraph.docker import load_image_by_name, load_image_by_task_id
     if not image_name and not task_id:
         print("Specify either IMAGE-NAME or TASK-ID")
         sys.exit(1)
     try:
         if task_id:
             ok = load_image_by_task_id(task_id, tag)
         else:
             ok = load_image_by_name(image_name, tag)
         if not ok:
             sys.exit(1)
     except Exception:
         traceback.print_exc()
         sys.exit(1)
Example #3
0
def load_image(args):
    from taskgraph.docker import load_image_by_name, load_image_by_task_id

    if not args.get("image_name") and not args.get("task_id"):
        print("Specify either IMAGE-NAME or TASK-ID")
        sys.exit(1)
    try:
        if args["task_id"]:
            ok = load_image_by_task_id(args["task_id"], args.get("tag"))
        else:
            ok = load_image_by_name(args["image_name"], args.get("tag"))
        if not ok:
            sys.exit(1)
    except Exception:
        traceback.print_exc()
        sys.exit(1)