Last active
July 28, 2020 13:35
-
-
Save darko-mesaros/e029a1dabe4cc645dead6787b19f2bbd to your computer and use it in GitHub Desktop.
CDK - Testing bit of CodePipeline where we setup a testing stage to test CloudFormation templates with Lambda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --- test stage and actions --- | |
const prepTestChanges = new codepipeline_actions.CloudFormationCreateReplaceChangeSetAction({ | |
actionName: 'PrepTestChanges', | |
stackName: stageStackName, | |
changeSetName: stageChangeSetName, | |
adminPermissions: true, | |
parameterOverrides: { | |
"Environment": "STAGING", | |
"MinSize": "1", | |
"MaxSize": "2", | |
"InstanceType": "t2.micro" | |
}, | |
templatePath: buildOutput.atPath('template.yml'), | |
templateConfiguration: buildOutput.atPath('template-config.json'), | |
runOrder: 1, | |
}); | |
const executeTestChanges = new codepipeline_actions.CloudFormationExecuteChangeSetAction({ | |
actionName: 'ExecuteTestChanges', | |
stackName: stageStackName, | |
changeSetName: stageChangeSetName, | |
runOrder: 2, | |
}); | |
const lambdaTest = new codepipeline_actions.LambdaInvokeAction({ | |
actionName: 'lambdaIntegTest', | |
lambda: integLambda, | |
userParameters: [stageStackName], | |
runOrder: 3, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment