diff --git a/src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_constructs/adf_codebuild.py b/src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_constructs/adf_codebuild.py index 9c087082a..45d3c6816 100644 --- a/src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_constructs/adf_codebuild.py +++ b/src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_constructs/adf_codebuild.py @@ -47,7 +47,11 @@ def __init__(self, scope: core.Construct, id: str, shared_modules_bucket: str, d environment_variables=CodeBuild.generate_build_env_variables(_codebuild, shared_modules_bucket, map_params, target), privileged=target.get('properties', {}).get('privileged', False) or map_params['default_providers']['build'].get('properties', {}).get('privileged', False) ) - _spec = map_params['default_providers']['deploy'].get('properties', {}).get('spec_filename') or target.get('properties', {}).get('spec_filename') or 'deployspec.yml' + _spec_filename = ( + target.get('properties', {}).get('spec_filename') or + map_params['default_providers']['deploy'].get('properties', {}).get('spec_filename') or + 'deployspec.yml' + ) _codebuild.PipelineProject( self, 'project', @@ -57,7 +61,7 @@ def __init__(self, scope: core.Construct, id: str, shared_modules_bucket: str, d project_name="adf-deploy-{0}".format(id), timeout=core.Duration.minutes(_timeout), role=_iam.Role.from_role_arn(self, 'build_role', role_arn=_build_role), - build_spec=_codebuild.BuildSpec.from_source_filename(_spec) + build_spec=_codebuild.BuildSpec.from_source_filename(_spec_filename) ) self.deploy = Action( name="{0}".format(id),