fix: woodpecker and gitea construction typo
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline failed Details

wip-hostea-domain
Aravinth Manivannan 2022-06-30 01:08:22 +05:30
parent fc5a23e60a
commit 53ec0a3982
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
1 changed files with 9 additions and 9 deletions

View File

@ -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):
"""