(pipelines): add a way to add steps that aren't attached to stages
See original GitHub issueWe receive an error “The given Stage construct (‘foo/bar’) should contain at least one Stack” when migrating our code to the modern pipelines.
Reproduction Steps
pipeline.addStage(new cdk.Stage(scope, 'MyStage'));
What did you expect to happen?
We would like to continue adding custom stages containing only CodeBuild projects and/or Lambda Invoke actions. Not all of our stages have stacks.
Environment
- CDK CLI Version : 1.117.0 (build 0047c98)
- Framework Version: 1.117.0 (build 0047c98)
- Node.js Version: v14.15.0
- OS : macOS
- Language (Version): TypeScript
Workaround
const stage = new cdk.Stage(scope, 'MyStage');
new cdk.Stack(stage, 'EmptyStackRemoveThis', {
stackName: 'EmptyStackRemoveThis',
});
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Stages in Azure Pipelines - Microsoft Learn
A stage is a logical boundary in the pipeline. It can be used to mark separation of concerns (for example, Build, QA, and...
Read more >Pipeline Steps - Amazon SageMaker - AWS Documentation
Use a processing step to create a processing job for data processing. For more information on processing jobs, see Process Data and Evaluate...
Read more >Adding pipeline stages - Lever Support
How to add pipeline stages · Pipeline and archive reasons settings page. · Arrow pointing to Add Stage button to the upper-right of...
Read more >Add stages and jobs using the pipeline visual builder (#258970 ...
Out of scope: Needs dependencies #258971. Feedback needed! See the designs attached below and provide feedback in design comments. ⬇. Further details.
Read more >CI/CD pipelines explained: Everything you need to know
The benefits of a CI/CD pipeline include the following: Efficient software development. Smaller iterations (steps) allow for easier and more ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rix0rrr thanks,
addWave
works indeed.So basically, you cannot do this:
Instead users can do this:
I have to admit that it was not very intuitive to use
addWave
to add a CodePipeline stage instead of usingaddStage
for adding a stage 😃 In general, the new API seems quite intuitive and easy to use but maybe more of these use cases could be clarified in the docs?Br, Markus
Still occurring in version 119.