MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / acquire

Function acquire

misc/python/materialize/cli/orchestratord.py:430–460  ·  view source on GitHub ↗
(image: str, dev: bool, cluster: str)

Source from the content-addressed store, hash-verified

428
429
430def acquire(image: str, dev: bool, cluster: str):
431 args = []
432 if dev:
433 args.append("--dev")
434 subprocess.check_call(["bin/mzimage", "acquire", image, *args])
435 fingerprint = (
436 subprocess.check_output(
437 [
438 "bin/mzimage",
439 "fingerprint",
440 image,
441 *args,
442 ]
443 )
444 .decode()
445 .strip()
446 )
447 subprocess.check_call(
448 [
449 "docker",
450 "tag",
451 f"{image_registry()}/{image}:mzbuild-{fingerprint}",
452 f"{image_registry()}/{image}:{DEV_IMAGE_TAG}",
453 ]
454 )
455 kind(
456 "load",
457 "docker-image",
458 f"{image_registry()}/{image}:{DEV_IMAGE_TAG}",
459 cluster=cluster,
460 )
461
462
463def kind(*args: str, cluster: str, **subprocess_args):

Callers 2

runFunction · 0.85
environmentFunction · 0.85

Calls 4

image_registryFunction · 0.90
kindFunction · 0.85
appendMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected