Skip to content

Commit

Permalink
fix(aws-codepipeline): update CFN example. (#1653)
Browse files Browse the repository at this point in the history
This test is referred as example in the
[Cloudformation README](https://github.com/awslabs/aws-cdk/blob/master/packages/%40aws-cdk/aws-cloudformation/README.md).
But the example doesn't do what it intended.
Without specifying the runOrder the `pipelineExecuteChangeSetAction` will be triggered immediately without change set being populated,
which will lead to deployment failure.
After adding the `runOrder` the 3 actions will run in order and only be deployed after manual approval.
  • Loading branch information
AllanZhengYP authored and skinny85 committed Feb 19, 2019
1 parent f08ca15 commit 5dec01a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
"InputArtifacts": [],
"Name": "ApproveChanges",
"OutputArtifacts": [],
"RunOrder": 1
"RunOrder": 2
},
{
"ActionTypeId": {
Expand All @@ -264,7 +264,7 @@
"InputArtifacts": [],
"Name": "ExecuteChanges",
"OutputArtifacts": [],
"RunOrder": 1
"RunOrder": 3
}
],
"Name": "Deploy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,17 @@ const prodStage = {
changeSetName,
adminPermissions: true,
templatePath: source.outputArtifact.atPath('template.yaml'),
runOrder: 1,
}),
new codepipeline.ManualApprovalAction({
actionName: 'ApproveChanges',
runOrder: 2,
}),
new codepipeline.ManualApprovalAction({ actionName: 'ApproveChanges' }),
new cfn.PipelineExecuteChangeSetAction({
actionName: 'ExecuteChanges',
stackName,
changeSetName,
runOrder: 3,
}),
],
};
Expand Down

0 comments on commit 5dec01a

Please sign in to comment.