def test_get_tag(self) -> None: config = { "DOCKER_IMAGE_OPENEDX": "registry/openedx", "DOCKER_IMAGE_OPENEDX_DEV": "registry/openedxdev", } self.assertEqual("registry/openedx", images.get_tag(config, "openedx")) self.assertEqual("registry/openedxdev", images.get_tag(config, "openedx-dev"))
def _add_images_to_pull(remote_images: t.List[t.Tuple[str, str]], config: Config) -> t.List[t.Tuple[str, str]]: """ Add base and vendor images to the list of Docker images to pull on `tutor pull all`. """ for image in VENDOR_IMAGES: if config.get(f"RUN_{image.upper()}", True): remote_images.append((image, images.get_tag(config, image))) for image in BASE_IMAGE_NAMES: remote_images.append((image, images.get_tag(config, image))) return remote_images
def _add_core_images_to_push(remote_images: t.List[t.Tuple[str, str]], config: Config) -> t.List[t.Tuple[str, str]]: """ Add base images to the list of Docker images to push on `tutor push all`. """ for image in BASE_IMAGE_NAMES: remote_images.append((image, images.get_tag(config, image))) return remote_images
def _add_core_images_to_build( build_images: t.List[t.Tuple[str, t.Tuple[str, str], str, t.List[str]]], config: Config, ) -> t.List[t.Tuple[str, t.Tuple[str, str], str, t.List[str]]]: """ Add base images to the list of Docker images to build on `tutor build all`. """ for image in BASE_IMAGE_NAMES: tag = images.get_tag(config, image) build_images.append((image, ("build", image), tag, [])) return build_images