terraformDummyRepo/release_mixin.py

37 lines
829 B
Python
Raw Normal View History

2023-02-16 13:21:27 +00:00
from ddadevops import DevopsBuild
from ddadevops import execute
from ddadevops import gopass_field_from_path, gopass_password_from_path
from version import Version
2023-02-16 15:22:11 +00:00
def create_release_mixin_config(config, release_type, commit, file):
2023-02-16 13:21:27 +00:00
config.update({'ReleaseMixin':
2023-02-16 15:22:11 +00:00
{'commit_id': commit,
2023-02-16 13:21:27 +00:00
'file': file}})
return config
class ReleaseMixin(DevopsBuild):
def __init__(self, project, config):
super().__init__(project, config)
2023-02-16 15:22:11 +00:00
release_mixin_config = config['ReleaseMixin']
self.commit_id = release_mixin_config['commit_id']
2023-02-16 13:21:27 +00:00
self.file = release_mixin_config['file']
2023-02-16 15:22:11 +00:00
def init(self):
release_and_bump_version = InitReleaseService(self.commit_id, self.file).get_version()
return release_and_bump_version
2023-02-16 13:21:27 +00:00
2023-02-16 15:22:11 +00:00
2023-02-16 13:21:27 +00:00