MCPcopy Create free account
hub / github.com/apache/impala / _create_build_image

Method _create_build_image

docker/test-with-docker.py:642–670  ·  view source on GitHub ↗

Creates the "build image", with Impala compiled and data loaded.

(self)

Source from the content-addressed store, hash-verified

640 container.removed = True
641
642 def _create_build_image(self):
643 """Creates the "build image", with Impala compiled and data loaded."""
644 container = self._create_container(
645 image=self.base_image, name=self.name + "-build",
646 logdir="build",
647 logname="log-build.txt",
648 # entrypoint.sh will create a user with our uid; this
649 # allows the shared file systems to work seamlessly
650 entrypoint=["/mnt/base/entrypoint.sh", "build", str(os.getuid())])
651 self.containers.append(container)
652 self.monitor.add(container)
653 try:
654 logging.info("Docker container for build: %s", container)
655 _check_output(["docker", "start", container.id])
656 if not self._run_container(container):
657 raise Exception("Build container failed.")
658 logging.info("Committing docker container.")
659 self.image = _check_output(
660 ["docker", "commit",
661 "-c", "LABEL pwd=" + self.git_root,
662 "-c", "USER impdev",
663 "-c", "WORKDIR /home/impdev/Impala",
664 "-c", 'CMD ["/home/impdev/Impala/docker/entrypoint.sh", "shell"]',
665 container.id, "impala:built-" + self.name]).strip()
666 logging.info("Committed docker image: %s", self.image)
667 finally:
668 if self.cleanup_containers:
669 self._stop_container(container)
670 self._rm_container(container)
671
672 def _run_tests(self):
673 pool = multiprocessing.pool.ThreadPool(processes=self.suite_concurrency)

Callers 1

runMethod · 0.95

Calls 7

_create_containerMethod · 0.95
_run_containerMethod · 0.95
_stop_containerMethod · 0.95
_rm_containerMethod · 0.95
_check_outputFunction · 0.85
appendMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected