From 40e695a5dabe419008b9d742b487d683f6456381 Mon Sep 17 00:00:00 2001 From: jem Date: Tue, 31 Mar 2020 19:25:31 +0200 Subject: [PATCH] breaking change: move build_commons_path from create_devops_build_config -> create_devops_terraform_build_config --- build.py | 2 +- src/main/python/ddadevops/devops_build.py | 4 +--- src/main/python/ddadevops/devops_terraform_build.py | 7 +++++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/build.py b/build.py index 31f5f82..f181585 100644 --- a/build.py +++ b/build.py @@ -28,7 +28,7 @@ use_plugin("python.distutils") default_task = "publish" name = "ddadevops" -version = "0.4.3.dev2" +version = "0.5.0.dev0" summary = "tools to support builds combining gopass, terraform, dda-pallet, aws & hetzner-cloud" description = __doc__ authors = [Author("meissa GmbH", "buero@meissa-gmbh.de")] diff --git a/src/main/python/ddadevops/devops_build.py b/src/main/python/ddadevops/devops_build.py index 74e45ee..923bf18 100644 --- a/src/main/python/ddadevops/devops_build.py +++ b/src/main/python/ddadevops/devops_build.py @@ -2,11 +2,10 @@ from subprocess import run from .python_util import filter_none -def create_devops_build_config(stage, project_root_path, build_commons_path, module, +def create_devops_build_config(stage, project_root_path, module, build_dir_name='target'): return {'stage': stage, 'project_root_path': project_root_path, - 'build_commons_path': build_commons_path, 'module': module, 'build_dir_name': build_dir_name} @@ -18,7 +17,6 @@ class DevopsBuild: def __init__(self, project, config): self.stage = config['stage'] self.project_root_path = config['project_root_path'] - self.build_commons_path = config['build_commons_path'] self.module = config['module'] self.build_dir_name = config['build_dir_name'] self.project = project diff --git a/src/main/python/ddadevops/devops_terraform_build.py b/src/main/python/ddadevops/devops_terraform_build.py index 691f0cf..80da11e 100644 --- a/src/main/python/ddadevops/devops_terraform_build.py +++ b/src/main/python/ddadevops/devops_terraform_build.py @@ -7,21 +7,23 @@ from .python_util import filter_none from .devops_build import DevopsBuild, create_devops_build_config -def create_devops_terraform_build_config(stage, project_root_path, build_commons_path, module, +def create_devops_terraform_build_config(stage, project_root_path, module, additional_vars, build_dir_name='target', output_json_name='output.json', use_workspace=True, use_package_common_files=True, + build_commons_path=None, terraform_build_commons_dir_name='terraform', debug_print_terraform_command=False, additional_tfvar_files=[]): ret = create_devops_build_config( - stage, project_root_path, build_commons_path, module, build_dir_name) + stage, project_root_path, module, build_dir_name) ret.update({'additional_vars': additional_vars, 'output_json_name': output_json_name, 'use_workspace': use_workspace, 'use_package_common_files': use_package_common_files, + 'build_commons_path': build_commons_path, 'terraform_build_commons_dir_name': terraform_build_commons_dir_name, 'debug_print_terraform_command': debug_print_terraform_command, 'additional_tfvar_files': additional_tfvar_files}) @@ -80,6 +82,7 @@ class DevopsTerraformBuild(DevopsBuild): self.output_json_name = config['output_json_name'] self.use_workspace = config['use_workspace'] self.use_package_common_files = config['use_package_common_files'] + self.build_commons_path = config['build_commons_path'] self.terraform_build_commons_dir_name = config['terraform_build_commons_dir_name'] self.debug_print_terraform_command = config['debug_print_terraform_command'] self.additional_tfvar_files = config['additional_tfvar_files']