From 53ec0a39829f54c13a9311a7d6c5e182e72908f8 Mon Sep 17 00:00:00 2001 From: realaravinth Date: Thu, 30 Jun 2022 01:08:22 +0530 Subject: [PATCH] fix: woodpecker and gitea construction typo --- infrastructure/utils.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/infrastructure/utils.py b/infrastructure/utils.py index b4cd18d..68ef92d 100644 --- a/infrastructure/utils.py +++ b/infrastructure/utils.py @@ -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): """