Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: DBTP-1684 Pipelines #742

Merged
merged 2 commits into from
Jan 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions dbt_platform_helper/domain/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from dbt_platform_helper.providers.config import ConfigProvider
from dbt_platform_helper.providers.ecr import ECRProvider
from dbt_platform_helper.providers.files import FileProvider
from dbt_platform_helper.providers.terraform_manifest import TerraformManifestProvider
from dbt_platform_helper.providers.io import ClickIOProvider
from dbt_platform_helper.providers.terraform_manifest import TerraformManifestProvider
from dbt_platform_helper.utils.application import get_application_name
from dbt_platform_helper.utils.template import setup_templates
from dbt_platform_helper.utils.versioning import (
Expand All @@ -28,13 +28,15 @@ def __init__(
get_git_remote: Callable[[], str],
get_codestar_arn: Callable[[str], str],
io: ClickIOProvider = ClickIOProvider(),
file_provider: FileProvider = FileProvider(),
):
self.config_provider = config_provider
self.get_git_remote = get_git_remote
self.get_codestar_arn = get_codestar_arn
self.terraform_manifest_provider = terraform_manifest_provider
self.ecr_provider = ecr_provider
self.io = io
self.file_provider = file_provider

def generate(self, cli_terraform_platform_modules_version: str, deploy_branch: str):
platform_config = self.config_provider.load_and_validate_platform_config()
Expand Down Expand Up @@ -131,4 +133,6 @@ def _generate_terraform_environment_pipeline_manifest(
dir_path = f"terraform/environment-pipelines/{aws_account}"
makedirs(dir_path, exist_ok=True)

self.io.info(FileProvider.mkfile(".", f"{dir_path}/main.tf", contents, overwrite=True))
self.io.info(
self.file_provider.mkfile(".", f"{dir_path}/main.tf", contents, overwrite=True)
)