terraformDummyRepo/release_mixin.py
2023-02-16 16:35:02 +01:00

36 lines
829 B
Python

from ddadevops import DevopsBuild
from ddadevops import execute
from ddadevops import gopass_field_from_path, gopass_password_from_path
from version import Version
def create_release_mixin_config(config, release_type, commit, file):
config.update({'ReleaseMixin':
{'commit_id': commit,
'file': file}})
return config
class ReleaseMixin(DevopsBuild):
def __init__(self, project, config):
super().__init__(project, config)
release_mixin_config = config['ReleaseMixin']
self.commit_id = release_mixin_config['commit_id']
self.file = release_mixin_config['file']
def init(self):
release_and_bump_version = InitReleaseService(self.commit_id, self.file).get_version()
return release_and_bump_version