From 0f119710187695188087df41ae2a5160d83dd397 Mon Sep 17 00:00:00 2001 From: GilbN <24592972+GilbN@users.noreply.github.com> Date: Mon, 7 Oct 2024 19:03:07 +0200 Subject: [PATCH] Fix/add lsiobase (#59) * Forgot to add baseimage as alternative. * update tests for lsiobase --- ci/ci.py | 6 +++++- tests/test_ci.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ci/ci.py b/ci/ci.py index 62925ef..d3cfb66 100755 --- a/ci/ci.py +++ b/ci/ci.py @@ -524,6 +524,8 @@ def get_image_name(self) -> str: return f"linuxserver/lspipepr-{container_name}" case _ if "lsiodev" in self.image: return f"linuxserver/lsiodev-{container_name}" + case _ if "lsiobase" in self.image: + return f"linuxserver/docker-baseimage-{container_name}" case _: return self.image @@ -542,9 +544,11 @@ def get_build_url(self, tag) -> str: return f"https://ghcr.io/linuxserver/lspipepr-{container_name}:{tag}" case _ if "lsiodev" in self.image: return f"https://ghcr.io/linuxserver/lsiodev-{container_name}:{tag}" + case _ if "lsiobase" in self.image: + return f"https://ghcr.io/linuxserver/baseimage-{container_name}:{tag}" case _: return f"https://ghcr.io/{self.image}:{tag}" - + def get_build_info(self,container:Container,tag:str) -> dict[str,str]: """Get the build information from the container object. diff --git a/tests/test_ci.py b/tests/test_ci.py index f7ff5f5..051e3a8 100644 --- a/tests/test_ci.py +++ b/tests/test_ci.py @@ -185,6 +185,8 @@ def test_get_build_url(ci: CI) -> None: assert ci.get_build_url(tag) == f"https://ghcr.io/linuxserver/lsiodev-plex:{tag}" ci.image = "lspipepr/plex" assert ci.get_build_url(tag) == f"https://ghcr.io/linuxserver/lspipepr-plex:{tag}" + ci.image = "lsiobase/ubuntu" + assert ci.get_build_url(tag) == f"https://ghcr.io/linuxserver/baseimage-ubuntu:{tag}" def test_get_image_name(ci: CI) -> None: ci.image = "linuxserver/plex" @@ -192,4 +194,6 @@ def test_get_image_name(ci: CI) -> None: ci.image = "lsiodev/plex" assert ci.get_image_name() == "linuxserver/lsiodev-plex" ci.image = "lspipepr/plex" - assert ci.get_image_name() == "linuxserver/lspipepr-plex" \ No newline at end of file + assert ci.get_image_name() == "linuxserver/lspipepr-plex" + ci.image = "lsiobase/ubuntu" + assert ci.get_image_name() == "linuxserver/docker-baseimage-ubuntu"