fix update runtime

This commit is contained in:
Michael Jerger 2023-05-27 14:37:23 +02:00
parent 7ba01f3ee4
commit 0103080bbd
4 changed files with 7 additions and 2 deletions

View file

@ -28,7 +28,7 @@ use_plugin("python.distutils")
default_task = "publish" default_task = "publish"
name = "ddadevops" name = "ddadevops"
version = "4.0.0-dev64" version = "4.0.0-dev66"
summary = "tools to support builds combining gopass, terraform, dda-pallet, aws & hetzner-cloud" summary = "tools to support builds combining gopass, terraform, dda-pallet, aws & hetzner-cloud"
description = __doc__ description = __doc__
authors = [Author("meissa GmbH", "buero@meissa-gmbh.de")] authors = [Author("meissa GmbH", "buero@meissa-gmbh.de")]

View file

@ -53,6 +53,7 @@ class C4kBuild(DevopsBuild):
raise ValueError("C4kBuild requires BuildType.C4K") raise ValueError("C4kBuild requires BuildType.C4K")
def update_runtime_config(self, dns_record: DnsRecord): def update_runtime_config(self, dns_record: DnsRecord):
super().update_runtime_config(dns_record)
devops = self.devops_repo.get_devops(self.project) devops = self.devops_repo.get_devops(self.project)
devops.specialized_builds[BuildType.C4K].update_runtime_config(dns_record) devops.specialized_builds[BuildType.C4K].update_runtime_config(dns_record)
self.devops_repo.set_devops(self.project, devops) self.devops_repo.set_devops(self.project, devops)

View file

@ -1,5 +1,5 @@
import deprecation import deprecation
from .domain import InitService from .domain import InitService, DnsRecord
from .infrastructure import DevopsRepository, FileApi from .infrastructure import DevopsRepository, FileApi
@ -40,3 +40,6 @@ class DevopsBuild:
def initialize_build_dir(self): def initialize_build_dir(self):
devops = self.devops_repo.get_devops(self.project) devops = self.devops_repo.get_devops(self.project)
self.file_api.clean_dir(devops.build_path()) self.file_api.clean_dir(devops.build_path())
def update_runtime_config(self, dns_record: DnsRecord):
pass

View file

@ -19,6 +19,7 @@ class ProvsK3sBuild(DevopsBuild):
raise ValueError("K3SBuild requires BuildType.K3S") raise ValueError("K3SBuild requires BuildType.K3S")
def update_runtime_config(self, dns_record: DnsRecord): def update_runtime_config(self, dns_record: DnsRecord):
super().update_runtime_config(dns_record)
devops = self.devops_repo.get_devops(self.project) devops = self.devops_repo.get_devops(self.project)
devops.specialized_builds[BuildType.K3S].update_runtime_config(dns_record) devops.specialized_builds[BuildType.K3S].update_runtime_config(dns_record)
self.devops_repo.set_devops(self.project, devops) self.devops_repo.set_devops(self.project, devops)