Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(codepipeline): rename name in StageProps to stageName #2882

Merged
merged 1 commit into from
Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/@aws-cdk/app-delivery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const source = new codepipeline_actions.GitHubSourceAction({
/* ... */
});
pipeline.addStage({
name: 'source',
stageName: 'source',
actions: [source],
});

Expand All @@ -92,20 +92,20 @@ const buildAction = new codepipeline_actions.CodeBuildAction({
output: 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,
input: synthesizedApp,
});

// 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', {
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/app-delivery/test/integ.cicd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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', {
Expand All @@ -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');
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -338,7 +338,7 @@ function createSelfUpdatingStack(pipelineStack: cdk.Stack): SelfUpdatingPipeline
output: sourceOutput,
});
pipeline.addStage({
name: 'source',
stageName: 'source',
actions: [sourceAction],
});

Expand All @@ -351,7 +351,7 @@ function createSelfUpdatingStack(pipelineStack: cdk.Stack): SelfUpdatingPipeline
output: buildOutput,
});
pipeline.addStage({
name: 'build',
stageName: 'build',
actions: [buildAction],
});
return {synthesizedApp: buildOutput, pipeline};
Expand Down
20 changes: 10 additions & 10 deletions packages/@aws-cdk/aws-codepipeline-actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const sourceAction = new codepipeline_actions.CodeCommitSourceAction({
output: sourceOutput,
});
pipeline.addStage({
name: 'Source',
stageName: 'Source',
actions: [sourceAction],
});
```
Expand All @@ -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],
});
```
Expand All @@ -90,7 +90,7 @@ const sourceAction = new codepipeline_actions.S3SourceAction({
output: sourceOutput,
});
pipeline.addStage({
name: 'Source',
stageName: 'Source',
actions: [sourceAction],
});
```
Expand Down Expand Up @@ -136,7 +136,7 @@ const sourceAction = new codepipeline_actions.EcrSourceAction({
output: sourceOutput,
});
pipeline.addStage({
actionName: 'Source',
stageName: 'Source',
actions: [sourceAction],
});
```
Expand Down Expand Up @@ -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],
},
],
Expand Down Expand Up @@ -382,7 +382,7 @@ const deployAction = new codepipeline_actions.CodeDeployServerDeployAction({
deploymentGroup,
});
pipeline.addStage({
name: 'Deploy',
stageName: 'Deploy',
actions: [deployAction],
});
```
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -458,7 +458,7 @@ const deployAction = new codepipeline_actions.S3DeployAction({
input: sourceOutput,
});
const deployStage = pipeline.addStage({
name: 'Deploy',
stageName: 'Deploy',
actions: [deployAction],
});
```
Expand Down Expand Up @@ -552,7 +552,7 @@ const lambdaAction = new codepipeline_actions.LambdaInvokeAction({
lambda: fn,
});
pipeline.addStage({
actionName: 'Lambda',
stageName: 'Lambda',
actions: [lambdaAction],
});
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export = {
pollForSourceChanges: true,
});
pipeline.addStage({
name: 'source',
stageName: 'source',
actions: [source]
});

Expand All @@ -51,7 +51,7 @@ export = {
output: buildOutput,
});
pipeline.addStage({
name: 'build',
stageName: 'build',
actions: [buildAction],
});

Expand All @@ -63,7 +63,7 @@ export = {
const stackName = 'BrelandsStack';
const changeSetName = 'MyMagicalChangeSet';
pipeline.addStage({
name: 'prod',
stageName: 'prod',
actions: [
new cpactions.CloudFormationCreateReplaceChangeSetAction({
actionName: 'BuildChangeSetProd',
Expand Down Expand Up @@ -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({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const source = new cpactions.CodeCommitSourceAction({
pollForSourceChanges: true,
});
const sourceStage = {
name: 'Source',
stageName: 'Source',
actions: [source],
};

Expand All @@ -28,7 +28,7 @@ const stackName = 'OurStack';
const changeSetName = 'StagedChangeSet';

const prodStage = {
name: 'Deploy',
stageName: 'Deploy',
actions: [
new cpactions.CloudFormationCreateReplaceChangeSetAction({
actionName: 'PrepareChanges',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const lambdaSourceAction = new codepipeline_actions.CodeCommitSourceAction({
output: lambdaSourceOutput,
});
pipeline.addStage({
name: 'Source',
stageName: 'Source',
actions: [cdkSourceAction, lambdaSourceAction],
});

Expand Down Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const sourceAction = new cpactions.S3SourceAction({
output: sourceOutput,
});
const sourceStage = {
name: 'Source',
stageName: 'Source',
actions: [sourceAction],
};

Expand All @@ -33,7 +33,7 @@ role.addToPolicy(new iam.PolicyStatement({
resources: ['*']
}));
const cfnStage = {
name: 'CFN',
stageName: 'CFN',
actions: [
new cpactions.CloudFormationCreateUpdateStackAction({
actionName: 'CFN_Deploy',
Expand Down
Loading