Skip to content

Commit

Permalink
- Deployment pipeline no longer initializes resource if it is disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
gitwater committed Mar 15, 2021
1 parent 5a991de commit df4955e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/paco/application/reseng_deploymentpipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,8 @@ def init_stage_action(self, stage, action):
method(stage, action)

def init_resource(self):
if self.pipeline.is_enabled() == False:
return
self.pipeline.resolve_ref_obj = self
self.pipeline.configuration.resolve_ref_obj = self
self.pipeline_account_ctx = self.paco_ctx.get_account_context(self.pipeline.configuration.account)
Expand Down
4 changes: 2 additions & 2 deletions src/paco/cftemplates/asg.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ def __init__(
continue

if ecr_deploy and len(ecr_deploy.release_phase.ecs) > 0:
idx = 0
pull_repos = []
push_repos = []
for repository in ecr_deploy.repositories:
Expand Down Expand Up @@ -377,6 +376,7 @@ def __init__(
)
)
iam_cluster_cache = []
idx = 0
for command in ecr_deploy.release_phase.ecs:
service_obj = get_model_obj_from_ref(command.service, self.paco_ctx.project)
ecs_services_obj = get_parent_by_interface(service_obj, schemas.IECSServices)
Expand Down Expand Up @@ -457,7 +457,7 @@ def __init__(
Statement(
Sid='ECSReleasePhaseSSMAutomationExecution',
Effect=Allow,
Action=[
Action=[
Action('ssm', 'StartAutomationExecution'),
Action('ssm', 'StopAutomationExecution'),
Action('ssm', 'GetAutomationExecution'),
Expand Down

0 comments on commit df4955e

Please sign in to comment.