diff --git a/app.py b/app.py index 3f5f0f01..6ea212ac 100644 --- a/app.py +++ b/app.py @@ -6,6 +6,8 @@ from stacks.handlers_stack import HandlersStack from stacks.pipeline_stack import GitHubCDKPipelineStack +from git import Repo + from utils.environment import is_pipeline_synth STACK_VERSION = "V0x10x0" @@ -25,21 +27,26 @@ ) handlers_stack = HandlersStack( - app, + deploy_stage or app, f"CBHandlersStack{STACK_VERSION}", env=env, pac_framework=app.node.try_get_context("control-broker/pac-framework"), ) if continuously_deployed: + # try: + # current_branch = Repo().active_branch.name + # except TypeError: + # current_branch = None pipeline_stack = GitHubCDKPipelineStack( app, - f"CBPipelineStack{STACK_VERSION}", + f"CBCICDDeployment{STACK_VERSION}", env=env, **app.node.try_get_context( "control-broker/continuous-deployment/github-config" ), + # github_repo_branch=current_branch ) - # pipeline_stack.pipeline.add_stage(deploy_stage) + pipeline_stack.pipeline.add_stage(deploy_stage) app.synth() \ No newline at end of file diff --git a/cdk.json b/cdk.json index 036cfc85..9faaf720 100644 --- a/cdk.json +++ b/cdk.json @@ -26,7 +26,7 @@ "aws" ], "performance-testing-example-template": "supplementary_files/ExampleStack.template.json", - "control-broker/continuous-deployment/enabled": false, + "control-broker/continuous-deployment/enabled": true, "control-broker/continuous-deployment/github-config": { "github_repo_name": "control-broker", "github_repo_owner": "VerticalRelevance",