AddStageOpts

class aws_cdk.pipelines.AddStageOpts(*, post=None, pre=None, stack_steps=None)

Bases: object

Options to pass to addStage.

Parameters:
  • post (Optional[Sequence[Step]]) – Additional steps to run after all of the stacks in the stage. Default: - No additional steps

  • pre (Optional[Sequence[Step]]) – Additional steps to run before any of the stacks in the stage. Default: - No additional steps

  • stack_steps (Optional[Sequence[Union[StackSteps, Dict[str, Any]]]]) – Instructions for stack level steps. Default: - No additional instructions

ExampleMetadata:

infused

Example:

# pipeline: pipelines.CodePipeline

preprod = MyApplicationStage(self, "PreProd")
prod = MyApplicationStage(self, "Prod")

pipeline.add_stage(preprod,
    post=[
        pipelines.ShellStep("Validate Endpoint",
            commands=["curl -Ssf https://my.webservice.com/"]
        )
    ]
)
pipeline.add_stage(prod,
    pre=[
        pipelines.ManualApprovalStep("PromoteToProd")
    ]
)

Attributes

post

Additional steps to run after all of the stacks in the stage.

Default:
  • No additional steps

pre

Additional steps to run before any of the stacks in the stage.

Default:
  • No additional steps

stack_steps

Instructions for stack level steps.

Default:
  • No additional instructions