@@ -374,7 +374,9 @@ def _endtest(self, container:Container, tag:str, build_info:dict[str,str], packa
374374 "build_info" : build_info ,
375375 "test_results" : self .tag_report_tests [tag ]["test" ],
376376 "test_success" : test_success ,
377- "runtime" : runtime
377+ "runtime" : runtime ,
378+ "build_url" : self .get_build_url (tag ),
379+ "platform" : self .get_platform (tag ).upper ()
378380 }
379381 self .report_containers [tag ]["has_warnings" ] = any (warning [1 ] for warning in self .report_containers [tag ]["warnings" ].items ())
380382
@@ -510,6 +512,39 @@ def get_build_version(self,container:Container,tag:str) -> str:
510512 self .report_status = "FAIL"
511513 return build_version
512514
515+ def get_image_name (self ) -> str :
516+ """Get the image name from the IMAGE env.
517+
518+ Returns:
519+ str: The container name
520+ """
521+ _ , container_name = self .image .split ("/" )
522+ match self .image :
523+ case _ if "lspipepr" in self .image :
524+ return f"linuxserver/lspipepr-{ container_name } "
525+ case _ if "lsiodev" in self .image :
526+ return f"linuxserver/lsiodev-{ container_name } "
527+ case _:
528+ return self .image
529+
530+ def get_build_url (self , tag ) -> str :
531+ """Get the build url from the IMAGE env.
532+
533+ Args:
534+ tag (str): The tag we are testing
535+
536+ Returns:
537+ dict: Returns a dictionary with the build url and container name
538+ """
539+ _ , container_name = self .image .split ("/" )
540+ match self .image :
541+ case _ if "lspipepr" in self .image :
542+ return f"https://ghcr.io/linuxserver/lspipepr-{ container_name } :{ tag } "
543+ case _ if "lsiodev" in self .image :
544+ return f"https://ghcr.io/linuxserver/lsiodev-{ container_name } :{ tag } "
545+ case _:
546+ return f"https://ghcr.io/{ self .image } :{ tag } "
547+
513548 def get_build_info (self ,container :Container ,tag :str ) -> dict [str ,str ]:
514549 """Get the build information from the container object.
515550
@@ -526,7 +561,9 @@ def get_build_info(self,container:Container,tag:str) -> dict[str,str]:
526561 "created": "xxxx-xx-xx",
527562 "size": "100MB",
528563 "maintainer": "user"
529- "builder": "node"
564+ "builder": "node",
565+ "tag": "latest",
566+ "image": "linuxserver/xxx"
530567 }
531568 ```
532569 """
@@ -539,7 +576,9 @@ def get_build_info(self,container:Container,tag:str) -> dict[str,str]:
539576 "created" : container .attrs ["Config" ]["Labels" ]["org.opencontainers.image.created" ],
540577 "size" : "%.2f" % float (int (container .image .attrs ["Size" ])/ 1000000 ) + "MB" ,
541578 "maintainer" : container .attrs ["Config" ]["Labels" ]["maintainer" ],
542- "builder" : self .builder
579+ "builder" : self .builder ,
580+ "tag" : tag ,
581+ "image" : self .get_image_name ()
543582 }
544583 self ._add_test_result (tag , test , "PASS" , "-" , start_time )
545584 self .logger .success ("Get build info on tag '%s': PASS" , tag )
@@ -599,7 +638,7 @@ def report_render(self) -> None:
599638 report_containers = self .report_containers ,
600639 report_status = self .report_status ,
601640 meta_tag = self .meta_tag ,
602- image = self .image ,
641+ image = self .get_image_name () ,
603642 bucket = self .bucket ,
604643 region = self .region ,
605644 screenshot = self .screenshot ,
@@ -892,6 +931,7 @@ def create_docker_client(self) -> DockerClient|None:
892931 return docker .from_env ()
893932 except Exception :
894933 self .logger .error ("Failed to create Docker client!" )
934+
895935
896936class CIError (Exception ):
897937 pass
0 commit comments