Skip to content

Commit

Permalink
Fix eb bg pipeline example
Browse files Browse the repository at this point in the history
  • Loading branch information
SoManyHs committed Apr 11, 2019
1 parent e841b8c commit c66666e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import cdk = require('@aws-cdk/cdk');
import cpactions = require('@aws-cdk/aws-codepipeline-actions');
import cp = require('@aws-cdk/aws-codepipeline');
import cc = require('@aws-cdk/aws-codecommit');
import lambda = require('@aws-cdk/aws-lambda');
Expand Down Expand Up @@ -26,7 +27,7 @@ export class CdkStack extends cdk.Stack {
}
});

bucket.grantReadWrite(handler.role);
bucket.grantReadWrite(handler);

const repo = new cc.Repository(this, 'Repository', {
repositoryName: 'MyRepositoryName',
Expand All @@ -38,7 +39,7 @@ export class CdkStack extends cdk.Stack {
name: 'Source'
});

const sourceAction = new cc.PipelineSourceAction({
const sourceAction = new cpactions.CodeCommitSourceAction({
actionName: 'CodeCommit',
repository: repo,
});
Expand All @@ -51,7 +52,7 @@ export class CdkStack extends cdk.Stack {
});


const lambdaAction = new lambda.PipelineInvokeAction({
const lambdaAction = new cpactions.LambdaInvokeAction({
actionName: 'InvokeAction',
lambda: handler,
userParameters: '{"blueEnvironment":"' + blue_env + '","greenEnvironment":"' + green_env + '", "application":"' + app_name + '"}'
Expand All @@ -67,4 +68,4 @@ const app = new cdk.App();

new CdkStack(app, 'ElasticBeanstalkBG');

app.run();
app.run();
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"dependencies": {
"@aws-cdk/aws-elasticbeanstalk": "*",
"@aws-cdk/aws-codepipeline-actions": "*",
"@aws-cdk/aws-codepipeline": "*",
"@aws-cdk/aws-codecommit": "*",
"@aws-cdk/aws-lambda": "*",
Expand Down

0 comments on commit c66666e

Please sign in to comment.