-
Notifications
You must be signed in to change notification settings - Fork 4k
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
pipelines: specify dependencies between pre/post steps #17945
Comments
This sounds a bit like #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. 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. |
Allows users to specify step dependencies and closes #17945. Usage: ```ts const firstStep = new pipelines.ManualApprovalStep('B'); const secondStep = new pipelines.ManualApprovalStep('A'); secondStep.addStepDependency(firstStep); ``` And ```ts // Step A will depend on step B and step B will depend on step C const orderedSteps = pipelines.Step.sequence([ new pipelines.ManualApprovalStep('C'); new pipelines.ManualApprovalStep('B'); new pipelines.ManualApprovalStep('A'); ]); ``` ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Allows users to specify step dependencies and closes aws#17945. Usage: ```ts const firstStep = new pipelines.ManualApprovalStep('B'); const secondStep = new pipelines.ManualApprovalStep('A'); secondStep.addStepDependency(firstStep); ``` And ```ts // Step A will depend on step B and step B will depend on step C const orderedSteps = pipelines.Step.sequence([ new pipelines.ManualApprovalStep('C'); new pipelines.ManualApprovalStep('B'); new pipelines.ManualApprovalStep('A'); ]); ``` ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@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
The text was updated successfully, but these errors were encountered: