Closed jeromevdl closed 2 years ago
This sounds a bit like https://github.com/aws/aws-cdk/issues/16130 where I encountered a problem about adding a manual approval step using the pre/post commands in the CDK Pipelines.
I have a similar issue: no matter what I do - pass an array of steps in addStage, do one or multiple calls to addPost,... - the steps just end up side-by-side, being executed in parallel. In my case, it's a S3 deploy step and a cloudfront invalidation step. Using CDK 1.133.
I'm not sure though about the expected behavior: should e.g. multiple calls to addPost effectively result in steps being executed sequentially? There are other cases where parallel execution is desired, and there seems to be no way to specify which is preferred, I think?
I finally managed to work around this by creating a wave, adding the stage to it with the first post step, then adding the second post step to the wave. This results in the two steps being sequential in the code pipeline, in the correct order.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
I have a similar issue: no matter what I do - pass an array of steps in addStage, do one or multiple calls to addPost,... - the steps just end up side-by-side, being executed in parallel. In my case, it's a S3 deploy step and a cloudfront invalidation step. Using CDK 1.133.
I'm not sure though about the expected behavior: should e.g. multiple calls to addPost effectively result in steps being executed sequentially? There are other cases where parallel execution is desired, and there seems to be no way to specify which is preferred, I think?
@FreeWillaert which class/construct do you use for S3 deploy step and a CloudFront invalidation step?
What is the problem?
When adding multiple pre (or post) steps to a stage, I cannot specify the order. If I'm adding them in the order I'd like (using
addPre
oraddPost
), the generated pipeline actions are not in the correct order but alphabetically ordered.Reproduction Steps
Have a stage and add multiple pre steps:
The Validation Step is after the Boostrap one in my template, while it should be before as I've added it before.
If I change "Validation" to "Approval":
Approval is now before Bootstrap.
What did you expect to happen?
I expect to have the steps in the order I add them:
Should give Validation first and then Bootstrap
What actually happened?
Validation was after Bootstrap.
CDK CLI Version
2.0.0 (build 4b6ce31)
Framework Version
No response
Node.js Version
v17.0.1
OS
macOS BigSur 11.6.1 (M1)
Language
Typescript
Language Version
Typescript (4.5.2)
Other information
No response