Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/add lsiobase #59

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"