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

Replace dataall prefix by resourcePrefix in data pipeline creation #985

Merged
merged 1 commit into from
Jan 19, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self, target_uri):
)
)
CDKPipelineStack.write_ddk_json_multienvironment(path=os.path.join(self.code_dir_path, self.pipeline.repo), output_file="ddk.json", pipeline_environment=self.pipeline_environment, development_environments=self.development_environments, pipeline_name=self.pipeline.name)
CDKPipelineStack.write_ddk_app_multienvironment(path=os.path.join(self.code_dir_path, self.pipeline.repo), output_file="app.py", pipeline=self.pipeline, development_environments=self.development_environments)
CDKPipelineStack.write_ddk_app_multienvironment(path=os.path.join(self.code_dir_path, self.pipeline.repo), output_file="app.py", pipeline=self.pipeline, development_environments=self.development_environments, pipeline_environment=self.pipeline_environment)

logger.info(f"Pipeline Repo {self.pipeline.repo} Exists...Handling Update")
update_cmds = [
Expand All @@ -94,7 +94,7 @@ def __init__(self, target_uri):
raise Exception
except Exception as e:
self.initialize_repo()
CDKPipelineStack.write_ddk_app_multienvironment(path=os.path.join(self.code_dir_path, self.pipeline.repo), output_file="app.py", pipeline=self.pipeline, development_environments=self.development_environments)
CDKPipelineStack.write_ddk_app_multienvironment(path=os.path.join(self.code_dir_path, self.pipeline.repo), output_file="app.py", pipeline=self.pipeline, development_environments=self.development_environments, pipeline_environment=self.pipeline_environment)
CDKPipelineStack.write_ddk_json_multienvironment(path=os.path.join(self.code_dir_path, self.pipeline.repo), output_file="ddk.json", pipeline_environment=self.pipeline_environment, development_environments=self.development_environments, pipeline_name=self.pipeline.name)
self.git_push_repo()

Expand Down Expand Up @@ -157,7 +157,7 @@ def write_ddk_json_multienvironment(path, output_file, pipeline_environment, dev
print(json, file=text_file)

@staticmethod
def write_ddk_app_multienvironment(path, output_file, pipeline, development_environments):
def write_ddk_app_multienvironment(path, output_file, pipeline, development_environments, pipeline_environment):
header = f"""
# !/usr/bin/env python3

Expand All @@ -177,7 +177,7 @@ def __init__(
super().__init__(scope, f"dataall-{{environment_id.title()}}", **kwargs)
DataallPipelineStack(self, "{pipeline.name}-DataallPipelineStack", environment_id)

id = f"dataall-cdkpipeline-{pipeline.DataPipelineUri}"
id = f"{pipeline_environment.resourcePrefix}-cdkpipeline-{pipeline.DataPipelineUri}"
cicd_pipeline = (
ddk.CICDPipelineStack(
app,
Expand Down
Loading