Skip to content

Commit

Permalink
Fix/add lsiobase (#59)
Browse files Browse the repository at this point in the history
* Forgot to add baseimage as alternative.

* update tests for lsiobase
  • Loading branch information
GilbN authored Oct 7, 2024
1 parent 24176db commit 0f11971
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion ci/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down
6 changes: 5 additions & 1 deletion tests/test_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,15 @@ 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"
assert ci.get_image_name() == "linuxserver/plex"
ci.image = "lsiodev/plex"
assert ci.get_image_name() == "linuxserver/lsiodev-plex"
ci.image = "lspipepr/plex"
assert ci.get_image_name() == "linuxserver/lspipepr-plex"
assert ci.get_image_name() == "linuxserver/lspipepr-plex"
ci.image = "lsiobase/ubuntu"
assert ci.get_image_name() == "linuxserver/docker-baseimage-ubuntu"

0 comments on commit 0f11971

Please sign in to comment.