From 96b16288848a94e605060f7f7c7f3e08b38a63d6 Mon Sep 17 00:00:00 2001 From: Radoslaw Smogura Date: Fri, 11 Jan 2019 13:31:24 -0800 Subject: [PATCH] Use spread operator for lambda action, test * use spread operator for lambda invoke action; * revert `integ.pipeline-cfn.expected.json` --- .../test/integ.pipeline-cfn.expected.json | 16 ++++++++-------- .../@aws-cdk/aws-lambda/lib/pipeline-action.ts | 4 +--- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-cfn.expected.json b/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-cfn.expected.json index 2b8e29dac54f5..2481e51936f1f 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-cfn.expected.json +++ b/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-cfn.expected.json @@ -147,6 +147,12 @@ "PipelineC660917D": { "Type": "AWS::CodePipeline::Pipeline", "Properties": { + "ArtifactStore": { + "Location": { + "Ref": "PipelineArtifactsBucket22248F97" + }, + "Type": "S3" + }, "RoleArn": { "Fn::GetAtt": [ "PipelineRoleD68726F7", @@ -215,13 +221,7 @@ ], "Name": "CFN" } - ], - "ArtifactStore": { - "Location": { - "Ref": "PipelineArtifactsBucket22248F97" - }, - "Type": "S3" - } + ] }, "DependsOn": [ "PipelineRoleD68726F7", @@ -254,4 +254,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-lambda/lib/pipeline-action.ts b/packages/@aws-cdk/aws-lambda/lib/pipeline-action.ts index 706eafc5818f4..562d7238e38e4 100644 --- a/packages/@aws-cdk/aws-lambda/lib/pipeline-action.ts +++ b/packages/@aws-cdk/aws-lambda/lib/pipeline-action.ts @@ -83,9 +83,7 @@ export interface PipelineInvokeActionProps extends CommonPipelineInvokeActionPro export class PipelineInvokeAction extends codepipeline.Action { constructor(scope: cdk.Construct, id: string, props: PipelineInvokeActionProps) { super(scope, id, { - stage: props.stage, - role: props.role, - runOrder: props.runOrder, + ...props, category: codepipeline.ActionCategory.Invoke, provider: 'Lambda', artifactBounds: codepipeline.defaultBounds(),