dda-devops-build/src/main/python/ddadevops/hetzner_mixin.py

13 lines
527 B
Python
Raw Normal View History

2020-03-03 09:20:54 +00:00
from .credential import gopass_credential_from_env_path
class HetznerMixin:
def __init__(self, project, project_root_path, build_commons_path, module, stage):
super().__init__(self, project, project_root_path, build_commons_path, module, stage)
self.hetzner_api_key = gopass_credential_from_env_path('HETZNER_API_KEY_PATH')
def project_vars(self):
ret = super().project_vars
if self.hetzner_api_key:
ret['hetzner_api_key'] = self.hetzner_api_key
return ret