diff --git a/src/main/python/ddadevops/release_mixin/release_mixin.py b/src/main/python/ddadevops/release_mixin/release_mixin.py index fe89e70..e9348aa 100644 --- a/src/main/python/ddadevops/release_mixin/release_mixin.py +++ b/src/main/python/ddadevops/release_mixin/release_mixin.py @@ -1,9 +1,12 @@ +# TODO: jem, zam - 2023_04_14: mv file one dir up + from ..devops_build import DevopsBuild from .infrastructure import ReleaseRepository, ReleaseTypeRepository, VersionRepository from .infrastructure_api import GitApi, EnvironmentApi from .services import PrepareReleaseService, TagAndPushReleaseService from .domain import EnvironmentKeys +# TODO: jem, zam - 2023_04_14: use of config fkts is deprecated - use domain object instead (see: devops_image_build.py) def create_release_mixin_config(config_file, main_branch) -> dict: config = {} config.update( @@ -12,6 +15,7 @@ def create_release_mixin_config(config_file, main_branch) -> dict: 'config_file': config_file}}) return config +# TODO: jem, zam - 2023_04_14: use of config fkts is deprecated - use domain object instead (see: devops_image_build.py) def add_versions(config, release_version, bump_version) -> dict: config['ReleaseMixin'].update( {'release_version': release_version, @@ -19,7 +23,7 @@ def add_versions(config, release_version, bump_version) -> dict: return config class ReleaseMixin(DevopsBuild): - + # TODO: jem, zam - 2023_04_14: handover config as domain object def __init__(self, project, config): # todo: create services in init, dont expose repos etc in api super().__init__(project, config) release_mixin_config = config['ReleaseMixin'] @@ -37,11 +41,13 @@ class ReleaseMixin(DevopsBuild): self.release_repo = ReleaseRepository(self.version_repo, self.release_type_repo, self.main_branch) def prepare_release(self): + # TODO: jem, zam - 2023_04_14: instantiate service on object creation? prepare_release_service = PrepareReleaseService(self.release_repo) prepare_release_service.write_and_commit_release() prepare_release_service.write_and_commit_bump() def tag_and_push_release(self): + # TODO: jem, zam - 2023_04_14: instantiate service on object creation? tag_and_push_release_service = TagAndPushReleaseService(self.git_api) tag_and_push_release_service.tag_release(self.release_repo.get_release()) # tag_and_push_release_service.push_release()