fix: woodpecker and gitea construction typo
parent
fc5a23e60a
commit
53ec0a3982
|
@ -84,28 +84,28 @@ class Infra:
|
|||
"""
|
||||
return self._host_vars_dir(subdomain=subdomain).joinpath("provision.yml")
|
||||
|
||||
@staticmethod
|
||||
def get_gitea_uri(instance: Instance) -> str:
|
||||
@classmethod
|
||||
def get_gitea_uri(cls, instance: Instance) -> str:
|
||||
"""
|
||||
Get an instance's Gitea URI
|
||||
"""
|
||||
base = settings.HOSTEA["INFRA"]["HOSTEA_DOMAIN"]
|
||||
return f"https://{instance.name}{base}"
|
||||
return f"https://{instance.name}.{base}"
|
||||
|
||||
@staticmethod
|
||||
def _gen_woodpecker_hostname(instance: Instance) -> str:
|
||||
@classmethod
|
||||
def _gen_woodpecker_hostname(cls, instance: Instance) -> str:
|
||||
"""
|
||||
Get Woodpecker hostname of an instance
|
||||
"""
|
||||
return (f"{instance.name}-ci",)
|
||||
|
||||
@staticmethod
|
||||
def get_woodpecker_hostname(instance: Instance) -> str:
|
||||
@classmethod
|
||||
def get_woodpecker_hostname(cls, instance: Instance) -> str:
|
||||
"""
|
||||
Get an instance's Gitea URI
|
||||
"""
|
||||
base = settings.HOSTEA["INFRA"]["HOSTEA_DOMAIn"]
|
||||
return f"https://{self._gen_woodpecker_hostname(instance=instance)}{base}"
|
||||
base = settings.HOSTEA["INFRA"]["HOSTEA_DOMAIN"]
|
||||
return f"https://{cls._gen_woodpecker_hostname(instance=instance)}.{base}"
|
||||
|
||||
def get_flavor(self, instance: Instance):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue