Skip to content

(pipelines): add a way to add steps that aren't attached to stages #15945

@markusl

Description

@markusl

We 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/pipelinesCDK Pipelines libraryeffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions