|
|
@ -5,6 +5,7 @@ from src.main.python.ddadevops.infrastructure.release_mixin import ReleaseReposi
|
|
|
|
from src.main.python.ddadevops.application import PrepareReleaseService, TagAndPushReleaseService
|
|
|
|
from src.main.python.ddadevops.application import PrepareReleaseService, TagAndPushReleaseService
|
|
|
|
from src.main.python.ddadevops.domain import ReleaseConfig, EnvironmentKeys
|
|
|
|
from src.main.python.ddadevops.domain import ReleaseConfig, EnvironmentKeys
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: remove the config creation
|
|
|
|
def create_release_mixin_config(config_file, main_branch) -> dict:
|
|
|
|
def create_release_mixin_config(config_file, main_branch) -> dict:
|
|
|
|
config = {}
|
|
|
|
config = {}
|
|
|
|
config.update(
|
|
|
|
config.update(
|
|
|
@ -12,13 +13,14 @@ def create_release_mixin_config(config_file, main_branch) -> dict:
|
|
|
|
{'main_branch': main_branch,
|
|
|
|
{'main_branch': main_branch,
|
|
|
|
'config_file': config_file}})
|
|
|
|
'config_file': config_file}})
|
|
|
|
return config
|
|
|
|
return config
|
|
|
|
|
|
|
|
# TODO: remove the config creation
|
|
|
|
def add_versions(config, release_version, bump_version) -> dict:
|
|
|
|
def add_versions(config, release_version, bump_version) -> dict:
|
|
|
|
config['ReleaseMixin'].update(
|
|
|
|
config['ReleaseMixin'].update(
|
|
|
|
{'release_version': release_version,
|
|
|
|
{'release_version': release_version,
|
|
|
|
'bump_version': bump_version})
|
|
|
|
'bump_version': bump_version})
|
|
|
|
return config
|
|
|
|
return config
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: remove the config argument
|
|
|
|
class ReleaseMixin(DevopsBuild):
|
|
|
|
class ReleaseMixin(DevopsBuild):
|
|
|
|
def __init__(self, project: Project, config: Optional[dict] = None, release_config: Optional[ReleaseConfig] = None):
|
|
|
|
def __init__(self, project: Project, config: Optional[dict] = None, release_config: Optional[ReleaseConfig] = None):
|
|
|
|
if not release_config:
|
|
|
|
if not release_config:
|
|
|
|