From be574a17a57db871886911494bfae87cf7cac68c Mon Sep 17 00:00:00 2001 From: Adam Ruka Date: Mon, 17 Jun 2019 11:27:33 -0700 Subject: [PATCH] refactor(codepipeline): rename `name` in `StageProps` to `stageName`. (#2882) BREAKING CHANGE: the property designating the name of the stage when creating a CodePipeline is now called `stageName` instead of `name` --- packages/@aws-cdk/app-delivery/README.md | 8 ++--- .../@aws-cdk/app-delivery/test/integ.cicd.ts | 4 +-- .../test/test.pipeline-deploy-stack-action.ts | 28 +++++++-------- .../aws-codepipeline-actions/README.md | 20 +++++------ .../test.cloudformation-pipeline-actions.ts | 10 +++--- .../test/integ.cfn-template-from-repo.lit.ts | 4 +-- ...ambda-deployed-through-codepipeline.lit.ts | 6 ++-- .../test/integ.lambda-pipeline.ts | 4 +-- .../test/integ.pipeline-alexa-deploy.ts | 4 +-- .../test/integ.pipeline-cfn-cross-region.ts | 4 +-- .../integ.pipeline-cfn-wtih-action-role.ts | 4 +-- .../test/integ.pipeline-cfn.ts | 4 +-- ...line-code-build-multiple-inputs-outputs.ts | 4 +-- .../test/integ.pipeline-code-commit-build.ts | 4 +-- .../test/integ.pipeline-code-commit.ts | 4 +-- .../test/integ.pipeline-code-deploy.ts | 4 +-- .../test/integ.pipeline-ecr-source.ts | 4 +-- .../test/integ.pipeline-ecs-deploy.ts | 6 ++-- .../test/integ.pipeline-events.ts | 4 +-- .../test/integ.pipeline-jenkins.ts | 4 +-- .../test/integ.pipeline-manual-approval.ts | 4 +-- .../test/integ.pipeline-s3-deploy.ts | 4 +-- .../test/lambda/test.lambda-invoke-action.ts | 4 +-- .../test/test.pipeline.ts | 34 +++++++++---------- packages/@aws-cdk/aws-codepipeline/README.md | 6 ++-- .../@aws-cdk/aws-codepipeline/lib/pipeline.ts | 6 ++-- .../@aws-cdk/aws-codepipeline/lib/stage.ts | 4 +-- .../aws-codepipeline/test/test.action.ts | 22 ++++++------ .../aws-codepipeline/test/test.artifacts.ts | 16 ++++----- .../test/test.general-validation.ts | 4 +-- .../aws-codepipeline/test/test.stages.ts | 22 ++++++------ .../integ.pipeline-event-target.ts | 6 ++-- .../test/codepipeline/pipeline.test.ts | 4 +-- packages/decdk/examples/pipeline.json | 6 ++-- 34 files changed, 138 insertions(+), 138 deletions(-) diff --git a/packages/@aws-cdk/app-delivery/README.md b/packages/@aws-cdk/app-delivery/README.md index d07a38ac601b4..dbfc4143c2861 100644 --- a/packages/@aws-cdk/app-delivery/README.md +++ b/packages/@aws-cdk/app-delivery/README.md @@ -70,7 +70,7 @@ const source = new codepipeline_actions.GitHubSourceAction({ /* ... */ }); pipeline.addStage({ - name: 'source', + stageName: 'source', actions: [source], }); @@ -92,12 +92,12 @@ const buildAction = new codepipeline_actions.CodeBuildAction({ outputs: [synthesizedApp], }); pipeline.addStage({ - name: 'build', + stageName: 'build', actions: [buildAction], }); // Optionally, self-update the pipeline stack -const selfUpdateStage = pipeline.addStage({ name: 'SelfUpdate' }); +const selfUpdateStage = pipeline.addStage({ stageName: 'SelfUpdate' }); new cicd.PipelineDeployStackAction(pipelineStack, 'SelfUpdatePipeline', { stage: selfUpdateStage, stack: pipelineStack, @@ -105,7 +105,7 @@ new cicd.PipelineDeployStackAction(pipelineStack, 'SelfUpdatePipeline', { }); // Now add our service stacks -const deployStage = pipeline.addStage({ name: 'Deploy' }); +const deployStage = pipeline.addStage({ stageName: 'Deploy' }); const serviceStackA = new MyServiceStackA(app, 'ServiceStackA', { /* ... */ }); // Add actions to deploy the stacks in the deploy stage: const deployServiceAAction = new cicd.PipelineDeployStackAction(pipelineStack, 'DeployServiceStackA', { diff --git a/packages/@aws-cdk/app-delivery/test/integ.cicd.ts b/packages/@aws-cdk/app-delivery/test/integ.cicd.ts index 594e494eb03ef..7f58a8ca49164 100644 --- a/packages/@aws-cdk/app-delivery/test/integ.cicd.ts +++ b/packages/@aws-cdk/app-delivery/test/integ.cicd.ts @@ -23,10 +23,10 @@ const source = new cpactions.GitHubSourceAction({ output: sourceOutput, }); pipeline.addStage({ - name: 'Source', + stageName: 'Source', actions: [source], }); -const stage = pipeline.addStage({ name: 'Deploy' }); +const stage = pipeline.addStage({ stageName: 'Deploy' }); new cicd.PipelineDeployStackAction(stack, 'DeployStack', { stage, stack, diff --git a/packages/@aws-cdk/app-delivery/test/test.pipeline-deploy-stack-action.ts b/packages/@aws-cdk/app-delivery/test/test.pipeline-deploy-stack-action.ts index ad7713ed81d80..1da595f6aba91 100644 --- a/packages/@aws-cdk/app-delivery/test/test.pipeline-deploy-stack-action.ts +++ b/packages/@aws-cdk/app-delivery/test/test.pipeline-deploy-stack-action.ts @@ -31,14 +31,14 @@ export = nodeunit.testCase({ const pipeline = new codepipeline.Pipeline(stack, 'Pipeline'); const fakeAction = new FakeAction('Fake'); pipeline.addStage({ - name: 'FakeStage', + stageName: 'FakeStage', actions: [fakeAction], }); new PipelineDeployStackAction(stack, 'Action', { changeSetName: 'ChangeSet', input: fakeAction.outputArtifact, stack: new cdk.Stack(app, 'DeployedStack', { env: { account: stackAccount } }), - stage: pipeline.addStage({ name: 'DeployStage' }), + stage: pipeline.addStage({ stageName: 'DeployStage' }), adminPermissions: false, }); }, 'Cross-environment deployment is not supported'); @@ -60,7 +60,7 @@ export = nodeunit.testCase({ const pipeline = new codepipeline.Pipeline(stack, 'Pipeline'); const fakeAction = new FakeAction('Fake'); pipeline.addStage({ - name: 'FakeStage', + stageName: 'FakeStage', actions: [fakeAction], }); new PipelineDeployStackAction(stack, 'Action', { @@ -69,7 +69,7 @@ export = nodeunit.testCase({ executeChangeSetRunOrder: executeRunOrder, input: fakeAction.outputArtifact, stack: new cdk.Stack(app, 'DeployedStack'), - stage: pipeline.addStage({ name: 'DeployStage' }), + stage: pipeline.addStage({ stageName: 'DeployStage' }), adminPermissions: false, }); }, 'createChangeSetRunOrder must be < executeChangeSetRunOrder'); @@ -89,9 +89,9 @@ export = nodeunit.testCase({ const selfUpdatingStack = createSelfUpdatingStack(pipelineStack); const pipeline = selfUpdatingStack.pipeline; - const selfUpdateStage1 = pipeline.addStage({ name: 'SelfUpdate1' }); - const selfUpdateStage2 = pipeline.addStage({ name: 'SelfUpdate2' }); - const selfUpdateStage3 = pipeline.addStage({ name: 'SelfUpdate3' }); + const selfUpdateStage1 = pipeline.addStage({ stageName: 'SelfUpdate1' }); + const selfUpdateStage2 = pipeline.addStage({ stageName: 'SelfUpdate2' }); + const selfUpdateStage3 = pipeline.addStage({ stageName: 'SelfUpdate3' }); new PipelineDeployStackAction(pipelineStack, 'SelfUpdatePipeline', { stage: selfUpdateStage1, @@ -155,7 +155,7 @@ export = nodeunit.testCase({ const selfUpdatingStack = createSelfUpdatingStack(pipelineStack); const pipeline = selfUpdatingStack.pipeline; - const selfUpdateStage = pipeline.addStage({ name: 'SelfUpdate' }); + const selfUpdateStage = pipeline.addStage({ stageName: 'SelfUpdate' }); new PipelineDeployStackAction(pipelineStack, 'SelfUpdatePipeline', { stage: selfUpdateStage, stack: pipelineStack, @@ -191,7 +191,7 @@ export = nodeunit.testCase({ assumedBy: new iam.ServicePrincipal('cloudformation.amazonaws.com'), }); const pipeline = selfUpdatingStack.pipeline; - const selfUpdateStage = pipeline.addStage({ name: 'SelfUpdate' }); + const selfUpdateStage = pipeline.addStage({ stageName: 'SelfUpdate' }); const deployAction = new PipelineDeployStackAction(pipelineStack, 'SelfUpdatePipeline', { stage: selfUpdateStage, stack: pipelineStack, @@ -214,7 +214,7 @@ export = nodeunit.testCase({ // WHEN // // this our app/service/infra to deploy - const deployStage = pipeline.addStage({ name: 'Deploy' }); + const deployStage = pipeline.addStage({ stageName: 'Deploy' }); const deployAction = new PipelineDeployStackAction(pipelineStack, 'DeployServiceStackA', { stage: deployStage, stack: emptyStack, @@ -276,11 +276,11 @@ export = nodeunit.testCase({ const pipeline = new codepipeline.Pipeline(stack, 'Pipeline'); const fakeAction = new FakeAction('Fake'); pipeline.addStage({ - name: 'FakeStage', + stageName: 'FakeStage', actions: [fakeAction], }); const deployedStack = new cdk.Stack(app, 'DeployedStack'); - const deployStage = pipeline.addStage({ name: 'DeployStage' }); + const deployStage = pipeline.addStage({ stageName: 'DeployStage' }); const action = new PipelineDeployStackAction(stack, 'Action', { changeSetName: 'ChangeSet', input: fakeAction.outputArtifact, @@ -338,7 +338,7 @@ function createSelfUpdatingStack(pipelineStack: cdk.Stack): SelfUpdatingPipeline output: sourceOutput, }); pipeline.addStage({ - name: 'source', + stageName: 'source', actions: [sourceAction], }); @@ -351,7 +351,7 @@ function createSelfUpdatingStack(pipelineStack: cdk.Stack): SelfUpdatingPipeline outputs: [buildOutput], }); pipeline.addStage({ - name: 'build', + stageName: 'build', actions: [buildAction], }); return {synthesizedApp: buildOutput, pipeline}; diff --git a/packages/@aws-cdk/aws-codepipeline-actions/README.md b/packages/@aws-cdk/aws-codepipeline-actions/README.md index 7876f73bbf8bf..dcabfc3deae42 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/README.md +++ b/packages/@aws-cdk/aws-codepipeline-actions/README.md @@ -42,7 +42,7 @@ const sourceAction = new codepipeline_actions.CodeCommitSourceAction({ output: sourceOutput, }); pipeline.addStage({ - name: 'Source', + stageName: 'Source', actions: [sourceAction], }); ``` @@ -65,7 +65,7 @@ const sourceAction = new codepipeline_actions.GitHubSourceAction({ trigger: codepipeline_actions.GitHubTrigger.Poll // default: 'WebHook', 'None' is also possible for no Source trigger }); pipeline.addStage({ - name: 'Source', + stageName: 'Source', actions: [sourceAction], }); ``` @@ -90,7 +90,7 @@ const sourceAction = new codepipeline_actions.S3SourceAction({ output: sourceOutput, }); pipeline.addStage({ - name: 'Source', + stageName: 'Source', actions: [sourceAction], }); ``` @@ -136,7 +136,7 @@ const sourceAction = new codepipeline_actions.EcrSourceAction({ output: sourceOutput, }); pipeline.addStage({ - actionName: 'Source', + stageName: 'Source', actions: [sourceAction], }); ``` @@ -172,11 +172,11 @@ const buildAction = new codepipeline_actions.CodeBuildAction({ new codepipeline.Pipeline(this, 'MyPipeline', { stages: [ { - name: 'Source', + stageName: 'Source', actions: [sourceAction], }, { - name: 'Build', + stageName: 'Build', actions: [buildAction], }, ], @@ -382,7 +382,7 @@ const deployAction = new codepipeline_actions.CodeDeployServerDeployAction({ deploymentGroup, }); pipeline.addStage({ - name: 'Deploy', + stageName: 'Deploy', actions: [deployAction], }); ``` @@ -423,7 +423,7 @@ The deploy Action receives one input Artifact which contains the [image definiti ```typescript const deployStage = pipeline.addStage({ - name: 'Deploy', + stageName: 'Deploy', actions: [ new codepipeline_actions.EcsDeployAction({ actionName: 'DeployAction', @@ -458,7 +458,7 @@ const deployAction = new codepipeline_actions.S3DeployAction({ input: sourceOutput, }); const deployStage = pipeline.addStage({ - name: 'Deploy', + stageName: 'Deploy', actions: [deployAction], }); ``` @@ -552,7 +552,7 @@ const lambdaAction = new codepipeline_actions.LambdaInvokeAction({ lambda: fn, }); pipeline.addStage({ - actionName: 'Lambda', + stageName: 'Lambda', actions: [lambdaAction], }); ``` diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/cloudformation/test.cloudformation-pipeline-actions.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/cloudformation/test.cloudformation-pipeline-actions.ts index da6b2d30cc797..d0719607d51a7 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/cloudformation/test.cloudformation-pipeline-actions.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/cloudformation/test.cloudformation-pipeline-actions.ts @@ -31,7 +31,7 @@ export = { pollForSourceChanges: true, }); pipeline.addStage({ - name: 'source', + stageName: 'source', actions: [source] }); @@ -51,7 +51,7 @@ export = { outputs: [buildOutput], }); pipeline.addStage({ - name: 'build', + stageName: 'build', actions: [buildAction], }); @@ -63,7 +63,7 @@ export = { const stackName = 'BrelandsStack'; const changeSetName = 'MyMagicalChangeSet'; pipeline.addStage({ - name: 'prod', + stageName: 'prod', actions: [ new cpactions.CloudFormationCreateReplaceChangeSetAction({ actionName: 'BuildChangeSetProd', @@ -432,8 +432,8 @@ class TestFixture extends cdk.Stack { super(); this.pipeline = new codepipeline.Pipeline(this, 'Pipeline'); - this.sourceStage = this.pipeline.addStage({ name: 'Source' }); - this.deployStage = this.pipeline.addStage({ name: 'Deploy' }); + this.sourceStage = this.pipeline.addStage({ stageName: 'Source' }); + this.deployStage = this.pipeline.addStage({ stageName: 'Deploy' }); this.repo = new Repository(this, 'MyVeryImportantRepo', { repositoryName: 'my-very-important-repo' }); this.sourceOutput = new codepipeline.Artifact('SourceArtifact'); const source = new cpactions.CodeCommitSourceAction({ diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts index fc9b186042021..d0062f82a0eba 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts @@ -19,7 +19,7 @@ const source = new cpactions.CodeCommitSourceAction({ pollForSourceChanges: true, }); const sourceStage = { - name: 'Source', + stageName: 'Source', actions: [source], }; @@ -28,7 +28,7 @@ const stackName = 'OurStack'; const changeSetName = 'StagedChangeSet'; const prodStage = { - name: 'Deploy', + stageName: 'Deploy', actions: [ new cpactions.CloudFormationCreateReplaceChangeSetAction({ actionName: 'PrepareChanges', diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts index 4b67b20d5a153..a4add3b48f41f 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts @@ -36,7 +36,7 @@ const lambdaSourceAction = new codepipeline_actions.CodeCommitSourceAction({ output: lambdaSourceOutput, }); pipeline.addStage({ - name: 'Source', + stageName: 'Source', actions: [cdkSourceAction, lambdaSourceAction], }); @@ -107,13 +107,13 @@ const lambdaBuildAction = new codepipeline_actions.CodeBuildAction({ }); pipeline.addStage({ - name: 'Build', + stageName: 'Build', actions: [cdkBuildAction, lambdaBuildAction], }); // finally, deploy your Lambda Stack pipeline.addStage({ - name: 'Deploy', + stageName: 'Deploy', actions: [ new codepipeline_actions.CloudFormationCreateUpdateStackAction({ actionName: 'Lambda_CFN_Deploy', diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-pipeline.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-pipeline.ts index d31e0d1fd0695..42053330fe295 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-pipeline.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-pipeline.ts @@ -11,7 +11,7 @@ const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-lambda'); const pipeline = new codepipeline.Pipeline(stack, 'Pipeline'); -const sourceStage = pipeline.addStage({ name: 'Source' }); +const sourceStage = pipeline.addStage({ stageName: 'Source' }); const bucket = new s3.Bucket(stack, 'PipelineBucket', { versioned: true, removalPolicy: cdk.RemovalPolicy.Destroy, @@ -36,7 +36,7 @@ const lambdaFun = new lambda.Function(stack, 'LambdaFun', { handler: 'index.handler', runtime: lambda.Runtime.Nodejs810, }); -const lambdaStage = pipeline.addStage({ name: 'Lambda' }); +const lambdaStage = pipeline.addStage({ stageName: 'Lambda' }); lambdaStage.addAction(new cpactions.LambdaInvokeAction({ actionName: 'Lambda' , lambda: lambdaFun, diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts index 2070499dc672f..fc9c1c6cdb3f9 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts @@ -19,12 +19,12 @@ const sourceAction = new cpactions.S3SourceAction({ bucketKey: 'key', }); const sourceStage = { - name: 'Source', + stageName: 'Source', actions: [sourceAction], }; const deployStage = { - name: 'Deploy', + stageName: 'Deploy', actions: [ new cpactions.AlexaSkillDeployAction({ actionName: 'DeploySkill', diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts index 7c29963c50039..891774d4eb951 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts @@ -29,11 +29,11 @@ new codepipeline.Pipeline(stack, 'MyPipeline', { artifactBucket: bucket, stages: [ { - name: 'Source', + stageName: 'Source', actions: [sourceAction], }, { - name: 'CFN', + stageName: 'CFN', actions: [ new cpactions.CloudFormationCreateUpdateStackAction({ actionName: 'CFN_Deploy', diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn-wtih-action-role.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn-wtih-action-role.ts index 448e652bbfc85..d095e8b5dda99 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn-wtih-action-role.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn-wtih-action-role.ts @@ -21,7 +21,7 @@ const sourceAction = new cpactions.S3SourceAction({ output: sourceOutput, }); const sourceStage = { - name: 'Source', + stageName: 'Source', actions: [sourceAction], }; @@ -33,7 +33,7 @@ role.addToPolicy(new iam.PolicyStatement({ resources: ['*'] })); const cfnStage = { - name: 'CFN', + stageName: 'CFN', actions: [ new cpactions.CloudFormationCreateUpdateStackAction({ actionName: 'CFN_Deploy', diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn.ts index 6810fbbffc99b..a1bfe36a4ccb7 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-cfn.ts @@ -25,7 +25,7 @@ const source = new cpactions.S3SourceAction({ bucketKey: 'key', }); const sourceStage = { - name: 'Source', + stageName: 'Source', actions: [ source, new cpactions.S3SourceAction({ @@ -45,7 +45,7 @@ const role = new Role(stack, 'CfnChangeSetRole', { pipeline.addStage(sourceStage); pipeline.addStage({ - name: 'CFN', + stageName: 'CFN', actions: [ new cpactions.CloudFormationCreateReplaceChangeSetAction({ actionName: 'DeployCFN', diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts index e41e602496952..c14abced15c11 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts @@ -35,7 +35,7 @@ const sourceAction2 = new cpactions.S3SourceAction({ output: source2Output, }); pipeline.addStage({ - name: 'Source', + stageName: 'Source', actions: [ sourceAction1, sourceAction2, @@ -68,7 +68,7 @@ const testAction = new cpactions.CodeBuildAction({ ], }); pipeline.addStage({ - name: 'Build', + stageName: 'Build', actions: [ buildAction, testAction, diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts index b8020e81ca084..81b3c0a5733a1 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts @@ -38,12 +38,12 @@ const testAction = new cpactions.CodeBuildAction({ new codepipeline.Pipeline(stack, 'Pipeline', { stages: [ { - name: 'source', + stageName: 'source', actions: [sourceAction], }, ], }).addStage({ - name: 'build', + stageName: 'build', actions: [ buildAction, testAction, diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit.ts index 33cb7a4326848..54063d0f83c82 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-commit.ts @@ -12,7 +12,7 @@ const repo = new codecommit.Repository(stack, 'MyRepo', { repositoryName: 'my-re new codepipeline.Pipeline(stack, 'Pipeline', { stages: [ { - name: 'source', + stageName: 'source', actions: [ new cpactions.CodeCommitSourceAction({ actionName: 'source', @@ -22,7 +22,7 @@ new codepipeline.Pipeline(stack, 'Pipeline', { ], }, { - name: 'build', + stageName: 'build', actions: [ new cpactions.ManualApprovalAction({ actionName: 'manual' }), ], diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts index 7dc68544e5c69..61d9c479374c6 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts @@ -31,7 +31,7 @@ const pipeline = new codepipeline.Pipeline(stack, 'Pipeline', { artifactBucket: bucket, }); -const sourceStage = pipeline.addStage({ name: 'Source' }); +const sourceStage = pipeline.addStage({ stageName: 'Source' }); const sourceOutput = new codepipeline.Artifact('SourceOutput'); const sourceAction = new cpactions.S3SourceAction({ actionName: 'S3Source', @@ -41,7 +41,7 @@ const sourceAction = new cpactions.S3SourceAction({ }); sourceStage.addAction(sourceAction); -const deployStage = pipeline.addStage({ name: 'Deploy' }); +const deployStage = pipeline.addStage({ stageName: 'Deploy' }); deployStage.addAction(new cpactions.CodeDeployServerDeployAction({ actionName: 'CodeDeploy', deploymentGroup, diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts index 93c78ad25cfa7..2b34b1b27996f 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts @@ -16,14 +16,14 @@ const pipeline = new codepipeline.Pipeline(stack, 'MyPipeline', { }); const repository = new ecr.Repository(stack, 'MyEcrRepo'); -const sourceStage = pipeline.addStage({ name: 'Source' }); +const sourceStage = pipeline.addStage({ stageName: 'Source' }); sourceStage.addAction(new cpactions.EcrSourceAction({ actionName: 'ECR_Source', output: new codepipeline.Artifact(), repository, })); -const approveStage = pipeline.addStage({ name: 'Approve' }); +const approveStage = pipeline.addStage({ stageName: 'Approve' }); approveStage.addAction(new cpactions.ManualApprovalAction({ actionName: 'ManualApproval' })); app.synth(); diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts index 063daf62b504f..c7836b0f371b6 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts @@ -87,15 +87,15 @@ new codepipeline.Pipeline(stack, 'MyPipeline', { artifactBucket: bucket, stages: [ { - name: 'Source', + stageName: 'Source', actions: [sourceAction], }, { - name: 'Build', + stageName: 'Build', actions: [buildAction], }, { - name: 'Deploy', + stageName: 'Deploy', actions: [ new cpactions.EcsDeployAction({ actionName: 'DeployAction', diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-events.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-events.ts index 82390aeab3b3a..6f5838b0aaac2 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-events.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-events.ts @@ -28,12 +28,12 @@ const sourceAction = new cpactions.CodeCommitSourceAction({ pollForSourceChanges: true, }); const sourceStage = pipeline.addStage({ - name: 'Source', + stageName: 'Source', actions: [sourceAction], }); pipeline.addStage({ - name: 'Build', + stageName: 'Build', actions: [ new cpactions.CodeBuildAction({ actionName: 'CodeBuildAction', diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts index c5e5bafab7058..4d2379130545b 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts @@ -23,7 +23,7 @@ const sourceAction = new cpactions.S3SourceAction({ output: sourceOutput, }); pipeline.addStage({ - name: 'Source', + stageName: 'Source', actions: [sourceAction], }); @@ -34,7 +34,7 @@ const jenkinsProvider = new cpactions.JenkinsProvider(stack, 'JenkinsProvider', }); pipeline.addStage({ - name: 'Build', + stageName: 'Build', actions: [ new cpactions.JenkinsAction({ actionName: 'JenkinsBuild', diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts index 146c3b215438c..ec9824d7eb08f 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts @@ -13,7 +13,7 @@ new codepipeline.Pipeline(stack, 'Pipeline', { artifactBucket: bucket, stages: [ { - name: 'Source', + stageName: 'Source', actions: [ new cpactions.S3SourceAction({ actionName: 'S3', @@ -24,7 +24,7 @@ new codepipeline.Pipeline(stack, 'Pipeline', { ], }, { - name: 'Approve', + stageName: 'Approve', actions: [ new cpactions.ManualApprovalAction({ actionName: 'ManualApproval', diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts index 60175d7d456e2..723d9c6456825 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts @@ -24,11 +24,11 @@ const deployBucket = new s3.Bucket(stack, 'DeployBucket', {}); new codepipeline.Pipeline(stack, 'Pipeline', { stages: [ { - name: 'Source', + stageName: 'Source', actions: [sourceAction], }, { - name: 'Deploy', + stageName: 'Deploy', actions: [ new cpactions.S3DeployAction({ actionName: 'DeployAction', diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/lambda/test.lambda-invoke-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/lambda/test.lambda-invoke-action.ts index c6a63c9be5a51..9b262faf21554 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/lambda/test.lambda-invoke-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/lambda/test.lambda-invoke-action.ts @@ -97,7 +97,7 @@ function stackIncludingLambdaInvokeCodePipeline(userParams: { [key: string]: any new codepipeline.Pipeline(stack, 'Pipeline', { stages: [ { - name: 'Source', + stageName: 'Source', actions: [ new cpactions.GitHubSourceAction({ actionName: 'GitHub', @@ -109,7 +109,7 @@ function stackIncludingLambdaInvokeCodePipeline(userParams: { [key: string]: any ], }, { - name: 'Invoke', + stageName: 'Invoke', actions: [ new cpactions.LambdaInvokeAction({ actionName: 'Lambda', diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/test.pipeline.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/test.pipeline.ts index 8a26b9d0c109e..26a4a702b6432 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/test.pipeline.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/test.pipeline.ts @@ -29,7 +29,7 @@ export = { repository, }); pipeline.addStage({ - name: 'source', + stageName: 'source', actions: [source], }); @@ -37,7 +37,7 @@ export = { source: new codebuild.CodePipelineSource() }); pipeline.addStage({ - name: 'build', + stageName: 'build', actions: [ new cpactions.CodeBuildAction({ actionName: 'build', @@ -76,7 +76,7 @@ export = { const p = new codepipeline.Pipeline(stack, 'P'); p.addStage({ - name: 'Source', + stageName: 'Source', actions: [ new cpactions.GitHubSourceAction({ actionName: 'GH', @@ -92,7 +92,7 @@ export = { }); p.addStage({ - name: 'Two', + stageName: 'Two', actions: [ new cpactions.ManualApprovalAction({ actionName: 'Boo' }), ], @@ -135,7 +135,7 @@ export = { const p = new codepipeline.Pipeline(stack, 'P'); p.addStage({ - name: 'Source', + stageName: 'Source', actions: [ new cpactions.GitHubSourceAction({ actionName: 'GH', @@ -151,7 +151,7 @@ export = { }); p.addStage({ - name: 'Two', + stageName: 'Two', actions: [ new cpactions.ManualApprovalAction({ actionName: 'Boo' }), ], @@ -194,7 +194,7 @@ export = { const p = new codepipeline.Pipeline(stack, 'P'); p.addStage({ - name: 'Source', + stageName: 'Source', actions: [ new cpactions.GitHubSourceAction({ actionName: 'GH', @@ -209,7 +209,7 @@ export = { }); p.addStage({ - name: 'Two', + stageName: 'Two', actions: [ new cpactions.ManualApprovalAction({ actionName: 'Boo' }), ], @@ -293,7 +293,7 @@ export = { const pipeline = new codepipeline.Pipeline(stack, 'PL'); pipeline.addStage({ - name: 'S1', + stageName: 'S1', actions: [ new cpactions.S3SourceAction({ actionName: 'A1', @@ -305,7 +305,7 @@ export = { }); pipeline.addStage({ - name: 'S2', + stageName: 'S2', actions: [ new cpactions.ManualApprovalAction({ actionName: 'A2' }), ], @@ -455,7 +455,7 @@ export = { bucket, }); pipeline.addStage({ - name: 'Source', + stageName: 'Source', actions: [ source1, source2, @@ -476,7 +476,7 @@ export = { ], }); pipeline.addStage({ - name: 'Stage', + stageName: 'Stage', actions: [lambdaAction], }); @@ -613,12 +613,12 @@ export = { bucket, }); pipeline.addStage({ - name: 'Stage1', + stageName: 'Stage1', actions: [sourceAction], }); pipeline.addStage({ - name: 'Stage2', + stageName: 'Stage2', actions: [ new cpactions.CloudFormationCreateReplaceChangeSetAction({ actionName: 'Action1', @@ -734,7 +734,7 @@ export = { new codepipeline.Pipeline(pipelineStack, 'Pipeline', { stages: [ { - name: 'Source', + stageName: 'Source', actions: [ new cpactions.S3SourceAction({ actionName: 'S3', @@ -745,7 +745,7 @@ export = { ], }, { - name: 'Build', + stageName: 'Build', actions: [ new cpactions.CodeBuildAction({ actionName: 'CodeBuild', @@ -867,7 +867,7 @@ export = { function stageForTesting(stack: Stack): codepipeline.IStage { const pipeline = new codepipeline.Pipeline(stack, 'pipeline'); - return pipeline.addStage({ name: 'stage' }); + return pipeline.addStage({ stageName: 'stage' }); } function repositoryForTesting(stack: Stack): codecommit.Repository { diff --git a/packages/@aws-cdk/aws-codepipeline/README.md b/packages/@aws-cdk/aws-codepipeline/README.md index 8df3bef71fa5d..186b37be1fed0 100644 --- a/packages/@aws-cdk/aws-codepipeline/README.md +++ b/packages/@aws-cdk/aws-codepipeline/README.md @@ -38,7 +38,7 @@ You can provide Stages when creating the Pipeline: const pipeline = new codepipeline.Pipeline(this, 'MyFirstPipeline', { stages: [ { - name: 'Source', + stageName: 'Source', actions: [ // see below... ], @@ -51,7 +51,7 @@ Or append a Stage to an existing Pipeline: ```ts const sourceStage = pipeline.addStage({ - name: 'Source', + stageName: 'Source', actions: [ // optional property // see below... ], @@ -62,7 +62,7 @@ You can insert the new Stage at an arbitrary point in the Pipeline: ```ts const someStage = pipeline.addStage({ - name: 'SomeStage', + stageName: 'SomeStage', placement: { // note: you can only specify one of the below properties rightBefore: anotherStage, diff --git a/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts b/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts index 580d3f633243a..c32b587daa7db 100644 --- a/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts +++ b/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts @@ -38,7 +38,7 @@ export interface StageProps { /** * The physical, human-readable name to assign to this Pipeline Stage. */ - readonly name: string; + readonly stageName: string; /** * The list of Actions to create this Stage with. @@ -279,8 +279,8 @@ export class Pipeline extends PipelineBase { */ public addStage(props: StageAddToPipelineProps): IStage { // check for duplicate Stages and names - if (this.stages.find(s => s.stageName === props.name)) { - throw new Error(`Stage with duplicate name '${props.name}' added to the Pipeline`); + if (this.stages.find(s => s.stageName === props.stageName)) { + throw new Error(`Stage with duplicate name '${props.stageName}' added to the Pipeline`); } const stage = new Stage(props, this); diff --git a/packages/@aws-cdk/aws-codepipeline/lib/stage.ts b/packages/@aws-cdk/aws-codepipeline/lib/stage.ts index b3a22f5b78cab..24c7956067c74 100644 --- a/packages/@aws-cdk/aws-codepipeline/lib/stage.ts +++ b/packages/@aws-cdk/aws-codepipeline/lib/stage.ts @@ -27,9 +27,9 @@ export class Stage implements IStage { * Create a new Stage. */ constructor(props: StageProps, pipeline: Pipeline) { - validateName('Stage', props.name); + validateName('Stage', props.stageName); - this.stageName = props.name; + this.stageName = props.stageName; this.pipeline = pipeline; this.scope = new cdk.Construct(pipeline, this.stageName); diff --git a/packages/@aws-cdk/aws-codepipeline/test/test.action.ts b/packages/@aws-cdk/aws-codepipeline/test/test.action.ts index 501d2c395756f..54e8e78a2936b 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/test.action.ts +++ b/packages/@aws-cdk/aws-codepipeline/test/test.action.ts @@ -72,7 +72,7 @@ export = { new codepipeline.Pipeline(stack, 'Pipeline', { stages: [ { - name: 'Source', + stageName: 'Source', actions: [ new FakeSourceAction({ actionName: 'Source', @@ -86,7 +86,7 @@ export = { ], }, { - name: 'Build', + stageName: 'Build', actions: [ new FakeBuildAction({ actionName: 'Build', @@ -121,7 +121,7 @@ export = { new codepipeline.Pipeline(stack, 'Pipeline', { stages: [ { - name: 'Source', + stageName: 'Source', actions: [ new FakeSourceAction({ actionName: 'Source', @@ -136,7 +136,7 @@ export = { ], }, { - name: 'Build', + stageName: 'Build', actions: [ new FakeBuildAction({ actionName: 'Build', @@ -166,12 +166,12 @@ export = { output: sourceOutput, }); pipeline.addStage({ - name: 'Source', + stageName: 'Source', actions: [sourceAction], }); pipeline.addStage({ - name: 'Build', + stageName: 'Build', actions: [ new FakeBuildAction({ actionName: 'CodeBuild', @@ -228,7 +228,7 @@ export = { const pipeline = new codepipeline.Pipeline(stack, 'Pipeline', { stages: [ { - name: 'Source', + stageName: 'Source', actions: [ new FakeSourceAction({ actionName: 'Source', @@ -240,12 +240,12 @@ export = { }); const action = new FakeBuildAction({ actionName: 'FakeAction', input: sourceOutput }); - const stage2 = { - name: 'Stage2', + const stage2: codepipeline.StageProps = { + stageName: 'Stage2', actions: [action], }; - const stage3 = { - name: 'Stage3', + const stage3: codepipeline.StageProps = { + stageName: 'Stage3', actions: [action], }; diff --git a/packages/@aws-cdk/aws-codepipeline/test/test.artifacts.ts b/packages/@aws-cdk/aws-codepipeline/test/test.artifacts.ts index efb78a348b2f8..8701435352d78 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/test.artifacts.ts +++ b/packages/@aws-cdk/aws-codepipeline/test/test.artifacts.ts @@ -22,7 +22,7 @@ export = { const pipeline = new codepipeline.Pipeline(stack, 'Pipeline', { stages: [ { - name: 'Source', + stageName: 'Source', actions: [ new FakeSourceAction({ actionName: 'Source', @@ -31,7 +31,7 @@ export = { ], }, { - name: 'Build', + stageName: 'Build', actions: [ new FakeBuildAction({ actionName: 'Build', @@ -58,7 +58,7 @@ export = { const pipeline = new codepipeline.Pipeline(stack, 'Pipeline', { stages: [ { - name: 'Source', + stageName: 'Source', actions: [ new FakeSourceAction({ actionName: 'Source', @@ -67,7 +67,7 @@ export = { ], }, { - name: 'Build', + stageName: 'Build', actions: [ new FakeBuildAction({ actionName: 'Build', @@ -94,7 +94,7 @@ export = { const pipeline = new codepipeline.Pipeline(stack, 'Pipeline', { stages: [ { - name: 'Source', + stageName: 'Source', actions: [ new FakeSourceAction({ actionName: 'Source', @@ -103,7 +103,7 @@ export = { ], }, { - name: 'Build', + stageName: 'Build', actions: [ new FakeBuildAction({ actionName: 'Build', @@ -135,7 +135,7 @@ export = { new codepipeline.Pipeline(stack, 'Pipeline', { stages: [ { - name: 'Source', + stageName: 'Source', actions: [ new FakeSourceAction({ actionName: 'source1', @@ -148,7 +148,7 @@ export = { ], }, { - name: 'Build', + stageName: 'Build', actions: [ new FakeBuildAction({ actionName: 'build1', diff --git a/packages/@aws-cdk/aws-codepipeline/test/test.general-validation.ts b/packages/@aws-cdk/aws-codepipeline/test/test.general-validation.ts index fe01b6a432a49..637045f471244 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/test.general-validation.ts +++ b/packages/@aws-cdk/aws-codepipeline/test/test.general-validation.ts @@ -60,7 +60,7 @@ export = { const pipeline = new Pipeline(stack, 'Pipeline'); pipeline.addStage({ - name: 'FirstStage', + stageName: 'FirstStage', actions: [ new FakeSourceAction({ actionName: 'FakeSource', @@ -79,5 +79,5 @@ export = { function stageForTesting(): IStage { const stack = new cdk.Stack(); const pipeline = new Pipeline(stack, 'Pipeline'); - return pipeline.addStage({ name: 'stage' }); + return pipeline.addStage({ stageName: 'stage' }); } diff --git a/packages/@aws-cdk/aws-codepipeline/test/test.stages.ts b/packages/@aws-cdk/aws-codepipeline/test/test.stages.ts index addfb552a789c..f3b86a122d84f 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/test.stages.ts +++ b/packages/@aws-cdk/aws-codepipeline/test/test.stages.ts @@ -11,9 +11,9 @@ export = { const stack = new cdk.Stack(); const pipeline = new codepipeline.Pipeline(stack, 'Pipeline'); - const secondStage = pipeline.addStage({ name: 'SecondStage' }); + const secondStage = pipeline.addStage({ stageName: 'SecondStage' }); pipeline.addStage({ - name: 'FirstStage', + stageName: 'FirstStage', placement: { rightBefore: secondStage, }, @@ -33,10 +33,10 @@ export = { const stack = new cdk.Stack(); const pipeline = new codepipeline.Pipeline(stack, 'Pipeline'); - const firstStage = pipeline.addStage({ name: 'FirstStage' }); - pipeline.addStage({ name: 'ThirdStage' }); + const firstStage = pipeline.addStage({ stageName: 'FirstStage' }); + pipeline.addStage({ stageName: 'ThirdStage' }); pipeline.addStage({ - name: 'SecondStage', + stageName: 'SecondStage', placement: { justAfter: firstStage, }, @@ -56,12 +56,12 @@ export = { "attempting to insert a Stage before a Stage that doesn't exist results in an error"(test: Test) { const stack = new cdk.Stack(); const pipeline = new codepipeline.Pipeline(stack, 'Pipeline'); - const stage = pipeline.addStage({ name: 'Stage' }); + const stage = pipeline.addStage({ stageName: 'Stage' }); const anotherPipeline = new codepipeline.Pipeline(stack, 'AnotherPipeline'); test.throws(() => { anotherPipeline.addStage({ - name: 'AnotherStage', + stageName: 'AnotherStage', placement: { rightBefore: stage, }, @@ -74,12 +74,12 @@ export = { "attempting to insert a Stage after a Stage that doesn't exist results in an error"(test: Test) { const stack = new cdk.Stack(); const pipeline = new codepipeline.Pipeline(stack, 'Pipeline'); - const stage = pipeline.addStage({ name: 'Stage' }); + const stage = pipeline.addStage({ stageName: 'Stage' }); const anotherPipeline = new codepipeline.Pipeline(stack, 'AnotherPipeline'); test.throws(() => { anotherPipeline.addStage({ - name: 'AnotherStage', + stageName: 'AnotherStage', placement: { justAfter: stage, }, @@ -92,11 +92,11 @@ export = { "providing more than one placement value results in an error"(test: Test) { const stack = new cdk.Stack(); const pipeline = new codepipeline.Pipeline(stack, 'Pipeline'); - const stage = pipeline.addStage({ name: 'Stage' }); + const stage = pipeline.addStage({ stageName: 'Stage' }); test.throws(() => { pipeline.addStage({ - name: 'SecondStage', + stageName: 'SecondStage', placement: { rightBefore: stage, justAfter: stage, diff --git a/packages/@aws-cdk/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts b/packages/@aws-cdk/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts index 7747288920842..fa95c28002bea 100644 --- a/packages/@aws-cdk/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts +++ b/packages/@aws-cdk/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts @@ -21,7 +21,7 @@ const pipeline = new codepipeline.Pipeline(stack, 'pipelinePipeline22F2A91D'); const srcArtifact = new codepipeline.Artifact('Src'); pipeline.addStage({ - name: 'Source', + stageName: 'Source', actions: [new MockAction({ actionName: 'CodeCommit', category: codepipeline.ActionCategory.Source, @@ -34,7 +34,7 @@ pipeline.addStage({ outputs: [srcArtifact]})] }); pipeline.addStage({ - name: 'Build', + stageName: 'Build', actions: [new MockAction({ actionName: 'Hello', category: codepipeline.ActionCategory.Approval, @@ -47,4 +47,4 @@ new events.Rule(stack, 'rule', { targets: [new targets.CodePipeline(pipeline)] }); -app.synth(); \ No newline at end of file +app.synth(); diff --git a/packages/@aws-cdk/aws-events-targets/test/codepipeline/pipeline.test.ts b/packages/@aws-cdk/aws-events-targets/test/codepipeline/pipeline.test.ts index 38d642de3dbe0..455fd47fcf0a1 100644 --- a/packages/@aws-cdk/aws-events-targets/test/codepipeline/pipeline.test.ts +++ b/packages/@aws-cdk/aws-events-targets/test/codepipeline/pipeline.test.ts @@ -12,7 +12,7 @@ test('use codebuild project as an eventrule target', () => { const srcArtifact = new codepipeline.Artifact('Src'); const buildArtifact = new codepipeline.Artifact('Bld'); pipeline.addStage({ - name: 'Source', + stageName: 'Source', actions: [new TestAction({ actionName: 'Hello', category: codepipeline.ActionCategory.Source, @@ -21,7 +21,7 @@ test('use codebuild project as an eventrule target', () => { outputs: [srcArtifact]})] }); pipeline.addStage({ - name: 'Build', + stageName: 'Build', actions: [new TestAction({ actionName: 'Hello', category: codepipeline.ActionCategory.Build, diff --git a/packages/decdk/examples/pipeline.json b/packages/decdk/examples/pipeline.json index f87133e7d6b47..8c0c2ee5d315f 100644 --- a/packages/decdk/examples/pipeline.json +++ b/packages/decdk/examples/pipeline.json @@ -21,7 +21,7 @@ "Properties": { "stages": [ { - "name": "Source", + "stageName": "Source", "actions": [ { "@aws-cdk/aws-codepipeline-actions.CodeCommitSourceAction": { @@ -37,7 +37,7 @@ ] }, { - "name": "Build", + "stageName": "Build", "actions": [ { "@aws-cdk/aws-codepipeline-actions.CodeBuildAction": { @@ -60,7 +60,7 @@ ] }, { - "name": "Deploy", + "stageName": "Deploy", "actions": [ { "@aws-cdk/aws-codepipeline-actions.CloudFormationCreateUpdateStackAction": {